We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a805ed commit 664a207Copy full SHA for 664a207
pytest_cases/tests/issues/test_issue_fixture_union1.py
@@ -1,3 +1,5 @@
1
+from distutils.version import LooseVersion
2
+
3
import pytest
4
from pytest_cases import fixture_union
5
@@ -15,4 +17,8 @@ def test_foo(u):
15
17
16
18
19
def test_synthesis(module_results_dct):
- assert list(module_results_dct) == ['test_foo[u_is_a0]', 'test_foo[u_is_a1]']
20
+ if LooseVersion(pytest.__version__) < LooseVersion('3.0.0'):
21
+ # the way to make ids uniques in case of duplicates was different in old pytest
22
+ assert list(module_results_dct) == ['test_foo[u_is_0a]', 'test_foo[u_is_1a]']
23
+ else:
24
+ assert list(module_results_dct) == ['test_foo[u_is_a0]', 'test_foo[u_is_a1]']
0 commit comments