Pytest plugin to add a timestamp prefix to the pytest output
Project description
pytest-timestamper
Pytest plugin to add a timestamp prefix to the pytest output.
➜ myproject python3 -m pytest -v
==================================== test session starts ====================================
platform darwin -- Python 3.9.4, pytest-6.3.0.dev494+g43faea832.d20210528, py-1.10.0, ...
cachedir: .pytest_cache
rootdir: /Users/user/myproject
plugins: timestamper-0.1.dev14+gaacde4a
collected 3 items
[2021-06-06 12:19:06] tests/test_one.py::test_dummy PASSED [ 33%]
[2021-06-06 12:19:06] tests/test_one.py::test_dummy_two PASSED [ 66%]
[2021-06-06 12:19:06] tests/test_two.py::test_another_dummy PASSED [100%]
===================================== 3 passed in 0.02s =====================================
Motivation
For various reasons tests can be slower on some runs than other. However, without a timestamp in front of the test it is not clear to the user how long the current test has been taking. This plugin adds a simple timestamp in front of the pytest output.
Installation
pip install pytest-timestamper
Usage
To activate the plugin one simply needs to install it.
The user can update the format of the prefix with the --prefixfmt
and the datetime format with --datefmt
.
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
Close
Hashes for pytest-timestamper-0.0.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec283fdefc46a9fdb41c1e9badac144902b89bc292e50b97bcaf880e95647977 |
|
MD5 | df2998ada623ba893e86932475761bb8 |
|
BLAKE2b-256 | 896cc5e657db26f3716ad533157bb144cd0a5d14528df4c1c8a876c1c908ad84 |
Close
Hashes for pytest_timestamper-0.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6db3507c9fd879e021b87e4516472f97471a5643993bc86dfc2a5e262f6a09c9 |
|
MD5 | 77a5e9c00d84bba4b89944a65d42104a |
|
BLAKE2b-256 | dfc1484fa642565cfcdc27321de151a4e9edc731042c653fea9f05712a0a8904 |