chore: cleanup and harden pytest config (#1011)

* chore: cleanup and harden pytest config

* fix: try alternate terminate strategy

* Update cibuildwheel/docker_container.py

Co-authored-by: Joe Rickerby <joerick@mac.com>

Co-authored-by: Joe Rickerby <joerick@mac.com>
This commit is contained in:
Henry Schreiner
2022-02-22 17:27:20 -05:00
committed by GitHub
co-authored by Joe Rickerby
parent 2d1fee2b35
commit 45a211eb1c
3 changed files with 11 additions and 6 deletions
+4 -2
View File
@@ -100,9 +100,11 @@ class DockerContainer:
exc_tb: Optional[TracebackType],
) -> None:
self.bash_stdin.write(b"exit 0\n")
self.bash_stdin.flush()
self.process.wait(timeout=30)
self.bash_stdin.close()
self.process.terminate()
self.process.wait()
self.bash_stdout.close()
assert isinstance(self.name, str)