Improvements for pytest (rejected upstream)
Project description
pytest-enhancements
Enhancements to pytest that were rejected upstream. Might involve monkey-patching pytest directly.. :/
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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c34c35676c4dc088c8392c61523459b8c8ba874ee62d9ea60f550c6f8e06bef0 |
|
MD5 | 3d35344515e1e283807fd5a0dbb06d9e |
|
BLAKE2b-256 | fbf2cf11daa36c3598b7a831bcc77d684a95f0723032131d6b607109e51f7820 |
Close
Hashes for pytest_enhancements-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e3d77c11bc60d7056ade9d1b449e8ab08b3687eb373209923a9f0c13e4a86ec |
|
MD5 | 16b4b5f46293aff2a7a7134832d4dd16 |
|
BLAKE2b-256 | d6db5997e8dadd37aa5ecbeda54cb7a28f12ba904560c632108676203866c1cf |