File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
pytest_cases/tests/pytest_extension/parametrize_plus Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -35,13 +35,16 @@ def foo():
3535 assert mini_idval (a , 'a' , 1 ) == 'foo[%s]' % i
3636 assert ('LazyTupleItem(item=%s' % i ) in repr (a )
3737
38- # # test when the tuple is not unpacked -
39- # # note: this is not supposed to happen when @parametrize decorates a test function,
40- # # it only happens when @parametrize decorates a fixture - indeed in that case we generate the whole id ourselves
41- # assert mini_idval(at, 'a', 1) == 'a1'
42- # # test that retrieving the tuple does not loose the id
43- # at.value
44- # assert mini_idval(at, 'a', 1) == 'foo'
38+ # test when the tuple is not unpacked -
39+ # note: this is not supposed to happen when @parametrize decorates a test function,
40+ # it only happens when @parametrize decorates a fixture - indeed in that case we generate the whole id ourselves
41+ assert str (at ) == 'foo'
42+ assert not at .retrieved
43+ # test that retrieving the tuple does not loose the id
44+ v = at .get ()
45+ assert v == (1 , 2 )
46+ assert str (at ) == 'foo'
47+ assert at .retrieved
4548
4649
4750pytest53 = LooseVersion (pytest .__version__ ) >= LooseVersion ("5.3.0" )
You can’t perform that action at this time.
0 commit comments