Skip to main content

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.11

Date: 2021-01-26 13:08:31

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

Copyright (C) 2015 Richard Vézina <ml.richard.vezinar@gmail.com>

Release files for pytest-session2file 0.1.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-session2file 0.1.11
File Size Uploaded
pytest-session2file-0.1.11.tar.gz 3.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-session2file 0.1.11
File Interpreter ABI Platform
pytest_session2file-0.1.11-py3-none-any.whl Python 3 none any Details

Total release size: 19.3 kB

Release files / pytest-session2file-0.1.11.tar.gz

Download URL pytest-session2file-0.1.11.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b7bdc19c17acaf3991e6592efc570abf5c6d800905f031ce2570b173ec71309a
BLAKE2b-256 checksum
How to use checksums
63b208f71da81cdee5cca50fba892cf375d72df97554ef404b45d7ff4fb4de19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9

Release files / pytest_session2file-0.1.11-py3-none-any.whl

Download URL pytest_session2file-0.1.11-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1ac186668033329c97c2a48f091ea3f30d53071f8431b34245c65e03d323b7f1
BLAKE2b-256 checksum
How to use checksums
c6421f9dcc4b92bd3d1a90e0c03145d38b139dc1a8f8a6a71b629613a84cdf53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9

Release history Release notifications | RSS feed

This release

0.1.11 This release

2 release files

0.1.10

2 release files

0.1.9

1 release file

0.1.8

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page