pytest-session2file (aka: pytest-session_to_file for v0.1.0 - v0.1.2) is a py.test plugin for capturing and saving to file the stdout of py.test.
Project description
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.10
Date: 2020-05-28 13:20:41
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
Copyright (C) 2015 Richard Vézina <ml.richard.vezinar@gmail.com>
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pytest-session2file-0.1.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 575a290c6dd28eb71c7fd20373645b3c7ad91769ea66852004632a70a290e11c |
|
MD5 | 1c0962fd94f2c20320a6e3845f14c790 |
|
BLAKE2b-256 | 54c0109690f82abed5e926511636b72c97f7862ffd16245ef4fba52ad7c685bb |
Hashes for pytest_session2file-0.1.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cdd0e952a1fa8c9d7a514e434f160a4813eece867ef1392f3466c424ca8d02d |
|
MD5 | ac73826da820a2013bb3c5d64e156382 |
|
BLAKE2b-256 | 06535d1fa6bed108d63d590c3fc214cce6c03d5c05a9403079a17fc69bbe94b4 |