Provide data to parameterizezd tests from files
Project description
Setup
in conftest.py
pytest_plugins = ["parametrize_from_file.generate_tests"]
Usage
Code
from parametrize_from_file import params_from_yml
@params_from_yml
def test_first(string):
assert len(string) > 0
@params_from_yml
def test_second(numer_1, number_2):
assert number_1 > number_2
Data Files
test_data/test_first.yml
tc_not_zero_1:
string: some text
tc_not_zero_2:
string: another text
tc_not_zero_3:
string: still text
test_data/test_second.yml
tc_compare_1:
number_1: 4
number_2: 5
tc_compare_2:
number_1: 7
number_2: 5
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
params-from-file-0.0.2.tar.gz
(14.7 kB
view hashes)
Built Distribution
Close
Hashes for params_from_file-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22407733d7d2ff03c15c2a6dde2440b1afadd56866e6db02ba68f2dd15563816 |
|
MD5 | c9f6e769358012759e48e513b9674808 |
|
BLAKE2b-256 | bce4c18844c5b421d26342b23b5f8b4a1d795c4de3b9b4b5cc87428f926afd00 |