Skip to content

Commit e6e4508

Browse files
author
Sylvain MARIE
committed
Minor test changes for clarity
1 parent eafd9ac commit e6e4508

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

pytest_cases/tests/fixtures/test_fixture_in_parametrize.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ def b(second_letter):
2020
fixture_ref(a),
2121
fixture_ref(b),
2222
'o'])
23-
@pytest.mark.parametrize('foo', ['foo'])
24-
def test_foo(arg, foo):
25-
assert foo == 'foo'
23+
@pytest.mark.parametrize('bar', ['bar'])
24+
def test_foo(arg, bar):
25+
assert bar == 'bar'
2626
assert arg in ['z',
2727
'a',
2828
'ba',
@@ -31,8 +31,8 @@ def test_foo(arg, foo):
3131

3232

3333
def test_synthesis(module_results_dct):
34-
assert list(module_results_dct) == ['test_foo[test_foo_param__arg__0-z-foo]',
35-
'test_foo[a-foo]',
36-
'test_foo[b-a-foo]',
37-
'test_foo[b-b_param__second_letter__1-o-foo]',
38-
'test_foo[test_foo_param__arg__3-o-foo]']
34+
assert list(module_results_dct) == ['test_foo[test_foo_param__arg__0-z-bar]',
35+
'test_foo[a-bar]',
36+
'test_foo[b-a-bar]',
37+
'test_foo[b-b_param__second_letter__1-o-bar]',
38+
'test_foo[test_foo_param__arg__3-o-bar]']

pytest_cases/tests/fixtures/test_fixtures_parametrize_stereo.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ def __init__(self):
1515
self.current_state = 0
1616

1717
def assert_state_and_move(self, path, cfg_factory):
18+
# path should be the second parameter, changin every two
1819
assert path == STEREO_PATHS[self.current_state % 2]
20+
# types should be the first, changing every 4
1921
assert cfg_factory == CFG_TYPES[(self.current_state // 2)]
2022
self.current_state += 1
2123

pytest_cases/tests/fixtures/test_fixtures_union_2hard.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
from pytest_cases import param_fixture, fixture_union
22

3+
# basic parametrized fixtures
34
a = param_fixture('a', ['x', 'y'])
45
b = param_fixture('b', [1, 2])
6+
7+
# union fixtures
58
c = fixture_union('c', [a, b])
69
d = fixture_union('d', [b, a])
710

0 commit comments

Comments
 (0)