pytest-spec
pytest-spec copied to clipboard
`docstring_summary` ignores parametrization arguments
Hello.
When you set docstring_summary
in spec_test_format
variable it ignores parametrizations arguments.
I think it is a bug.
Failed scenario
Example test_code.py
:
import pytest
@pytest.mark.parametrize("package", [
"python",
"python-pip",
])
def test_package_is_intalled(package):
"""Test package is installed."""
assert True
Example pytest.ini
:
[pytest]
spec_test_format = {result} {docstring_summary}
Actual output:
✓ Test package is installed.
✓ Test package is installed.
Expected output:
✓ Test package is installed[python]
✓ Test package is installed[python-pip]
Success scenario
If you remove pytest.ini
file OR set it like this OR remove docstring everything works fine, actual and expected results are the same.
Example pytest.ini
:
[pytest]
spec_test_format = {result} {name}
Actual==Expected output:
✓ Package is intalled[python]
✓ Package is intalled[python-pip]