Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_flaky_session_finish_copies_flaky_report(
initial_report,
stream_report,
expected_report,
):
PLUGIN.stream.seek(0)
PLUGIN.stream.truncate()
PLUGIN.stream.write(stream_report)
PLUGIN.config = Mock()
PLUGIN.config.workeroutput = {'flaky_report': initial_report}
PLUGIN.pytest_sessionfinish()
assert PLUGIN.config.workeroutput['flaky_report'] == expected_report
def test_flaky_session_finish_copies_flaky_report(
initial_report,
stream_report,
expected_report,
):
PLUGIN.stream.seek(0)
PLUGIN.stream.truncate()
PLUGIN.stream.write(stream_report)
PLUGIN.config = Mock()
PLUGIN.config.workeroutput = {'flaky_report': initial_report}
PLUGIN.pytest_sessionfinish()
assert PLUGIN.config.workeroutput['flaky_report'] == expected_report