def test_random_fixtures_with_seed():
"""Check random fixture values will be the same when random seed
is explicitly provided through a custom pytest option.
"""
result_first = subprocess.run(
[*pytest_command, "--swh-web-random-seed=2021", "random_fixtures_test.py"],
capture_output=True,
cwd=os.path.dirname(__file__),
)
result_second = subprocess.run(
[*pytest_command, "--swh-web-random-seed=2021", "random_fixtures_test.py"],
capture_output=True,
cwd=os.path.dirname(__file__),
)
assert result_first.stderr == result_second.stderr
> assert b'Use "pytest --swh-web-random-seed=2021' in result_first.stdout
E assert b'Use "pytest --swh-web-random-seed=2021' in b'============================= test session starts ==============================\nplatform linux -- Python 3.7.3, py...ture_values - IndexError: Canno...\n======================== 13 warnings, 1 error in 3.11s =========================\n'
E + where b'============================= test session starts ==============================\nplatform linux -- Python 3.7.3, py...ture_values - IndexError: Canno...\n======================== 13 warnings, 1 error in 3.11s =========================\n' = CompletedProcess(args=['python3', '-m', 'pytest', '-s', '--swh-web-random-seed=2021', 'random_fixtures_test.py'], retu... IndexError: Canno...\n======================== 13 warnings, 1 error in 3.11s =========================\n', stderr=b'').stdout
.tox/py3/lib/python3.7/site-packages/swh/web/tests/test_random_fixtures.py:45: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Jan 25 2022, 3:40 PM