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.9.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

pytest_timestamper-0.0.9-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytest-timestamper-0.0.9.tar.gz
  • Upload date:
  • Size: 5.1 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

Hashes for pytest-timestamper-0.0.9.tar.gz
Algorithm Hash digest
SHA256 1e02f14d20cb8444a24de356d8c818a180559f0cb61119935fc6d64c6e6f963d
MD5 ce2029d4bcdc49b1f11ca993829674b9
BLAKE2b-256 16843ab9eab83e968f877db8de79f03b58c0ea48bee40e61978a12143e59bca9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytest_timestamper-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 4.5 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

Hashes for pytest_timestamper-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 229ba49f4dce27207bf9c5dc8531c983bc1c6a92e1de740567f914d6ff4b0b17
MD5 b116d5a5fdf9978abdcb09cf8fcf9708
BLAKE2b-256 c4949b78552324a6487c42723509d8ea366eaa1899798e122c3f374248b117ac

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