Flaky test
shenganzhang opened this issue · comments
tests/test_utilities.py::test_unique_id
can fail when running with pytest --randomly-seed=123
.
It works for me locally, can you show how it fails for you?
It works for me locally, can you show how it fails for you?
=================================== FAILURES ===================================
___________________________ test_unique_id[case0-1] ____________________________
case = (), expected = '1'
@parametrize("case,expected", [((), "1"), (("foo",), "foo2")])
def test_unique_id(case, expected):
> assert _.unique_id(*case) == expected
E AssertionError: assert '4' == '1'
E - 1
E + 4
tests/test_utilities.py:642: AssertionError
__________________________ test_unique_id[case1-foo2] __________________________
case = ('foo',), expected = 'foo2'
@parametrize("case,expected", [((), "1"), (("foo",), "foo2")])
def test_unique_id(case, expected):
> assert _.unique_id(*case) == expected
E AssertionError: assert 'foo5' == 'foo2'
E - foo2
E ? ^
E + foo5
E ? ^
tests/test_utilities.py:642: AssertionError
@shenganzhang as far as I can see, this code does not depend on the seed. Can you share more info, so maybe I'll be able to reproduce it? The specific commit you're testing, the python version, and the os version?