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)
+1 -1
View File
@@ -6,7 +6,7 @@ import nox
nox.options.sessions = ["lint", "check_manifest", "tests"]
PYTHON_ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9"]
PYTHON_ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10"]
DIR = Path(__file__).parent.resolve()
+6 -3
View File
@@ -9,21 +9,24 @@ build-backend = "setuptools.build_meta"
[tool.black]
line-length = 100
target-version = ['py36', 'py37', 'py38', 'py39']
target-version = ['py36', 'py37', 'py38', 'py39', 'py310']
[tool.isort]
profile = "black"
multi_line_output = 3
[tool.pytest.ini_options]
minversion = 6.0
minversion = "6.0"
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
junit_family = "xunit2"
testpaths = [
"test",
"unit_test",
]
xfail_strict = true
filterwarnings = ["error"]
log_cli_level = "info"
[tool.mypy]