Skip to main content

pytest-unittest-id-runner

This project provides a simple pytest plugin that converts unittest-style test identifiers into pytest-style test identifiers when passed as file_or_dir arguments to pytest on the command line. This plug allows the following

pytest path.to.test_file.TestClass.test_method

to be used instead of

pytest path/to/test_file.py::TestClass::test_method

Installation

The plugin can be installed with:

pip install pytest-unittest-id-runner

Once installed, the plugin automatically attempts to perform the test identifier conversion without further configuration.

Motivation

This plugin fills a fairly specific niche. There are some projects out there that use unittest for testing instead of pytest, but they use unittest in a straightforward way, so that pytest can run the tests with its unittest compatibility support. When working on such a project, one may prefer to work with the tests locally using pytest. One motivation for doing this could be using a particular pytest feature or plugin for debugging test failures, since the pytest ecosystem is much bigger than unittest's. In this case, one will find that the tests are run in CI with unittest and the failures are printed in the unittest style. With pytest-unittest-id-runner installed, one can simply copy and paste the unittest identifiers from the CI output onto a pytest command line in order to debug the tests locally and not worry about converting between unittest and pytest styles of test identifier.

Metadata

Release files for pytest-unittest-id-runner 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-unittest-id-runner 0.1.1
File Size Uploaded
pytest_unittest_id_runner-0.1.1.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-unittest-id-runner 0.1.1
File Interpreter ABI Platform
pytest_unittest_id_runner-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.1 kB

Release files / pytest_unittest_id_runner-0.1.1.tar.gz

Download URL pytest_unittest_id_runner-0.1.1.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
756b162e44b8a099110f963844e75604563909a59bdcf1f341e79415386ea2b3
BLAKE2b-256 checksum
How to use checksums
291319627c7f2c660e77359e5edee62f7dce3ea9d94124dd93c75426b147d2e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 9, 2025.

Transparency log

Release files / pytest_unittest_id_runner-0.1.1-py3-none-any.whl

Download URL pytest_unittest_id_runner-0.1.1-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e8be2054e10487ddc0baef113067a80391b6503d4cdc0ced420c162198c5e5a
BLAKE2b-256 checksum
How to use checksums
dae08645deac954bbe6adb08880020d2d0723b8d21f6519e3e9c576b22b15de3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 9, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page