Skip to content

Commit e569fd9

Browse files
committed
TST: parameterize test_creation
1 parent 5dfba11 commit e569fd9

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

test_cycler.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ def _cycles_equal(c1, c2):
2828
assert list(c1) == list(c2)
2929

3030

31-
def test_creation():
32-
c = cycler(c='rgb')
33-
yield _cycler_helper, c, 3, ['c'], [['r', 'g', 'b']]
34-
c = cycler(c=list('rgb'))
35-
yield _cycler_helper, c, 3, ['c'], [['r', 'g', 'b']]
36-
c = cycler(cycler(c='rgb'))
37-
yield _cycler_helper, c, 3, ['c'], [['r', 'g', 'b']]
31+
@pytest.mark.parametrize('c', [cycler(c='rgb'),
32+
cycler(c=list('rgb')),
33+
cycler(cycler(c='rgb'))],
34+
ids=['from string',
35+
'from list',
36+
'from cycler'])
37+
def test_creation(c):
38+
_cycler_helper(c, 3, ['c'], [['r', 'g', 'b']])
3839

3940

4041
def test_compose():

0 commit comments

Comments
 (0)