Skip to content

Commit cf00c53

Browse files
committed
fix cleanup
1 parent 76f3d77 commit cf00c53

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/pytest_databases/_service.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ def run(
190190
yield service
191191
if transient:
192192
container.stop()
193-
container.remove()
194193

195194

196195
@pytest.fixture(scope="session")
@@ -235,7 +234,5 @@ def pytest_sessionfinish(session: pytest.Session, exitstatus: int) -> Generator[
235234
return (yield)
236235
finally:
237236
if not hasattr(session.config, "workerinput") and _get_ctrl_file(session).exists():
238-
# if we're running on xdist, delete the ctrl file, telling the deamon proc
239-
# to stop all running containers.
240-
# when not running on xdist, containers are stopped by the service itself
237+
# we're running on xdist, so clean up all containers at the end of the session
241238
_stop_all_containers(get_docker_client())

0 commit comments

Comments
 (0)