Skip to main content

pytest-enhancements

Enhancements to pytest that were rejected upstream. Might involve monkey-patching pytest directly.. :/

See also my pytest branch with more enhancements.

Features

  • Supports passing dictionaries to @pytest.mark.parametrize:

    @pytest.mark.parametrize('arg1,arg2,expected_id', {
        "myid_12": [1, 2, "[myid_12]"],
        "replaced_id": pytest.param(3, 4, "[replaced_id]", id="myid_34"),
        "myid_56": pytest.param(5, 6, "[myid_56]"),
    })
    def test_parametrize_dict(request, arg1, arg2, expected_id):
        if expected_id is None:
            expected_id = "[%d-%d-None]" % (arg1, arg2)
        assert request.node.nodeid.endswith(expected_id)
    

    (rejected in https://github.com/pytest-dev/pytest/pull/5850)

Installation

$ pip install pytest-enhancements

License

Distributed under the terms of the GNU GPL v3.0 license.

Release files for pytest-enhancements 0.0.4

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-enhancements 0.0.4
File Size Uploaded
pytest-enhancements-0.0.4.tar.gz 2.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-enhancements 0.0.4
File Interpreter ABI Platform
pytest_enhancements-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 17.0 kB

Release files / pytest-enhancements-0.0.4.tar.gz

Download URL pytest-enhancements-0.0.4.tar.gz
Size 2.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a7fd697a6f44d9709b31a569fe4a86a2c96e329541f5dbbaf41645cbe8a021a7
BLAKE2b-256 checksum
How to use checksums
ddc59cee2b7b5cd5047ee96d346aa0aacab484e447103361fd46bf9156b9f4d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.1

Release files / pytest_enhancements-0.0.4-py3-none-any.whl

Download URL pytest_enhancements-0.0.4-py3-none-any.whl
Size 14.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a390df6cece471cbea201f6c9c633ec3123bb727234663e6e84ec7578bcb732
BLAKE2b-256 checksum
How to use checksums
62274546ff5459d2f6598b469ed31c4dd2fb39365b9626ad758e652b6798414e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.1

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.2

2 release files

0.0.1

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