Skip to main content

Pytest plugin to add a timestamp prefix to the pytest output

Project description

pytest-timestamper

CI Status Code style: black PyPI version PyPI pyversions Imports: isort

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

pytest-timestamper-0.0.10.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

pytest_timestamper-0.0.10-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file pytest-timestamper-0.0.10.tar.gz.

File metadata

  • Download URL: pytest-timestamper-0.0.10.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for pytest-timestamper-0.0.10.tar.gz
Algorithm Hash digest
SHA256 ec283fdefc46a9fdb41c1e9badac144902b89bc292e50b97bcaf880e95647977
MD5 df2998ada623ba893e86932475761bb8
BLAKE2b-256 896cc5e657db26f3716ad533157bb144cd0a5d14528df4c1c8a876c1c908ad84

See more details on using hashes here.

File details

Details for the file pytest_timestamper-0.0.10-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_timestamper-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 6db3507c9fd879e021b87e4516472f97471a5643993bc86dfc2a5e262f6a09c9
MD5 77a5e9c00d84bba4b89944a65d42104a
BLAKE2b-256 dfc1484fa642565cfcdc27321de151a4e9edc731042c653fea9f05712a0a8904

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page