Open alx72n opened 2 years ago
Hello.
When you set docstring_summary in spec_test_format variable it ignores parametrizations arguments. I think it is a bug.
docstring_summary
spec_test_format
Example test_code.py:
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.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]
If you remove pytest.ini file OR set it like this OR remove docstring everything works fine, actual and expected results are the same.
[pytest] spec_test_format = {result} {name}
Actual==Expected output:
✓ Package is intalled[python] ✓ Package is intalled[python-pip]
Hello.
When you set
docstring_summary
inspec_test_format
variable it ignores parametrizations arguments. I think it is a bug.Failed scenario
Example
test_code.py
:Example
pytest.ini
:Actual output:
Expected output:
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
:Actual==Expected output: