Giter Site home page Giter Site logo

pytest_session2file's Introduction

pytest-session2file

pytest-session2file is a py.test plugin that save failure or test session information to a file pass that can be invoked as at command line when launching py.test run. It put in a file exactly what pytest return to stdout.

Installation

Install it with pip as follow :

pip install pytest-session2file

Usage

Once the plugin is installed edit your conftest.py and insert in the top of the file :

pytest_plugins = 'pytest_session2file'

Then you can launch your test with the new option --session2file= like this :

py.test --session2file=FILENAME

If you don't want to edit your conftest.py you can invoque py.test like this :

py.test -p pytest_session2file --session2file=FILENAME

At the end of the test execution you should obtain a text file with the content of stdout of py.test under the filename provided that look like this :

============== test session starts ====================

...

============== 2 passed in 34.70 seconds ==============

NOTE: Name has change from pytest-session_to_file to pytest-session2file

TODO: Write test

Inspire by: _pytest.pastebin

Ref: https://github.com/pytest-dev/pytest/blob/master/_pytest/pastebin.py

Platforms: All

Version: 0.1.9

Date: 2016-03-16 12:35:41

License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

Copyright (C) 2015 Richard Vézina [email protected]

pytest_session2file's People

Contributors

buhtigithub avatar mcepl avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.