diff --git a/integration-tests/conftest.py b/integration-tests/conftest.py index 2d3ae8a2c..8440df34b 100644 --- a/integration-tests/conftest.py +++ b/integration-tests/conftest.py @@ -81,6 +81,8 @@ def container_log(request: SubRequest): if request.session.testsfailed: error_log.seek(0) print(error_log.read(), file=sys.stderr) + else: + error_log.truncate(0) class ResponseComparator(JSONSnapshotExtension): @@ -350,13 +352,13 @@ def ignore_logprob_response_snapshot(snapshot): return snapshot.use_extension(IgnoreLogProbResponseComparator) -@pytest.fixture(scope="module") +@pytest.fixture(scope="session") def error_log(): with tempfile.TemporaryFile("w+") as tmp: yield tmp -@pytest.fixture(scope="module") +@pytest.fixture(scope="session") async def launcher(error_log): @contextlib.contextmanager def local_launcher(