diff options
| author | Egor Tensin <egor@tensin.name> | 2026-06-18 15:33:27 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-06-18 15:33:27 +0200 |
| commit | b1d66075b13c40606bb2d0bd8f90275b8f2e8abb (patch) | |
| tree | 95d5a5ef6b9e452fae3932699834930f1895cee9 /test/src/lib/tests.py | |
| parent | workflows/ci: add Python linting (diff) | |
| download | cimple-b1d66075b13c40606bb2d0bd8f90275b8f2e8abb.tar.gz cimple-b1d66075b13c40606bb2d0bd8f90275b8f2e8abb.zip | |
workflows/ci: use default Black settings
Diffstat (limited to 'test/src/lib/tests.py')
| -rw-r--r-- | test/src/lib/tests.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/src/lib/tests.py b/test/src/lib/tests.py index b20ecc5..c71a3ea 100644 --- a/test/src/lib/tests.py +++ b/test/src/lib/tests.py @@ -9,17 +9,17 @@ import pytest # Reference: https://github.com/pytest-dev/pytest/issues/3628 # Automatic generation of readable test IDs. def my_parametrize(names, values, ids=None, **kwargs): - _names = names.split(',') if isinstance(names, str) else names + _names = names.split(",") if isinstance(names, str) else names if not ids: if len(_names) == 1: - ids = [f'{names}={v}' for v in values] + ids = [f"{names}={v}" for v in values] else: _values = [ - combination.values if hasattr(combination, 'values') else combination + combination.values if hasattr(combination, "values") else combination for combination in values ] ids = [ - '-'.join(f'{k}={v}' for k, v in zip(_names, combination)) + "-".join(f"{k}={v}" for k, v in zip(_names, combination)) for combination in _values ] return pytest.mark.parametrize(names, values, ids=ids, **kwargs) |
