-
Notifications
You must be signed in to change notification settings - Fork 3
/
README
58 lines (28 loc) · 1.42 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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.11
**Date:** 2021-01-26 13:08:31
**License:** LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
Copyright (C) 2015 Richard Vézina <[email protected]>