Skip to content

Commit

Permalink
Fix fixture cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpio committed Nov 27, 2023
1 parent a93d826 commit ac3a7a4
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions tljh_repo2docker/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,11 @@ async def app(hub_app):
tljh_custom_jupyterhub_config(config)

app = await hub_app(config=config)
print(app)
return app


@pytest.fixture(autouse=True)
async def remove_all_test_images(image_name, generated_image_name, app):
try:
yield
finally:
async def _clean():
await remove_docker_image(image_name)
await remove_docker_image(generated_image_name)

app.io_loop.run_sync(_clean)
yield
await remove_docker_image(image_name)
await remove_docker_image(generated_image_name)

0 comments on commit ac3a7a4

Please sign in to comment.