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 06bc0c2 commit d53ffccCopy full SHA for d53ffcc
pytest_cases/tests/pytest_extension/issues/test_issue_124.py
@@ -0,0 +1,26 @@
1
+import pytest
2
+from pytest_cases import parametrize, parametrize_with_cases
3
+
4
5
+@parametrize(i=range(2), idgen="i=={i}")
6
+def case_i(i):
7
+ return i + 1
8
9
10
+@pytest.mark.parametrize('i', range(2), ids="i=={}".format)
11
+def case_k(i):
12
13
14
15
+@parametrize_with_cases(argnames="j", cases='.')
16
+def test_me(j):
17
+ assert j > 0
18
19
20
+def test_synthesis(module_results_dct):
21
+ assert list(module_results_dct) == [
22
+ 'test_me[i-i==0]',
23
+ 'test_me[i-i==1]',
24
+ 'test_me[k-i==0]',
25
+ 'test_me[k-i==1]',
26
+ ]
0 commit comments