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/mbk/git_tree/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
File details
Details for the file pytest-timestamper-0.0.8.tar.gz
.
File metadata
- Download URL: pytest-timestamper-0.0.8.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3caa392d377ebabd1bd5d17ba542bf1d9be0ed3b023ac51782e9d86dc83b809e |
|
MD5 | 010a3dd187dfa44aada23674333d5bd3 |
|
BLAKE2b-256 | 2bf98b03ec6cbad84517785b367b0382b46e91753b61e69d4c20182b37a6365a |
File details
Details for the file pytest_timestamper-0.0.8-py3-none-any.whl
.
File metadata
- Download URL: pytest_timestamper-0.0.8-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7401397ed1d9b1fd329b2b487608becaf0e7db8a96505634bc3595e3dfa726bc |
|
MD5 | 3f9b2462edf42ce29339d43bf02bc38f |
|
BLAKE2b-256 | 3d58d949540bf049ba60cf063b1c17df5eb586ecfbb02a0c1e7bfb6873d8dd26 |