()
| 74 | _wait_for_ready(self._container) |
| 75 | |
| 76 | def cleanup() -> None: |
| 77 | try: |
| 78 | container = client.containers.get(container_name) |
| 79 | container.stop() |
| 80 | except docker.errors.NotFound: |
| 81 | pass |
| 82 | atexit.unregister(cleanup) |
| 83 | |
| 84 | if stop_container: |
| 85 | atexit.register(cleanup) |