Improvements for pytest (rejected upstream)
Project description
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.
Project details
Release history Release notifications | RSS feed
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
Close
Hashes for pytest-enhancements-0.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7fd697a6f44d9709b31a569fe4a86a2c96e329541f5dbbaf41645cbe8a021a7 |
|
MD5 | 9ac95e81cc72c8d2f5db26016ce68e6e |
|
BLAKE2b-256 | ddc59cee2b7b5cd5047ee96d346aa0aacab484e447103361fd46bf9156b9f4d3 |
Close
Hashes for pytest_enhancements-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a390df6cece471cbea201f6c9c633ec3123bb727234663e6e84ec7578bcb732 |
|
MD5 | 363dff5c8b389c040c9bc6148ea35860 |
|
BLAKE2b-256 | 62274546ff5459d2f6598b469ed31c4dd2fb39365b9626ad758e652b6798414e |