From 45a211eb1c73804c4827e6c43e352c9af18f71af Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 22 Feb 2022 17:27:20 -0500 Subject: [PATCH] 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 Co-authored-by: Joe Rickerby --- cibuildwheel/docker_container.py | 6 ++++-- noxfile.py | 2 +- pyproject.toml | 9 ++++++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/cibuildwheel/docker_container.py b/cibuildwheel/docker_container.py index a145072e..20e5aacb 100644 --- a/cibuildwheel/docker_container.py +++ b/cibuildwheel/docker_container.py @@ -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) diff --git a/noxfile.py b/noxfile.py index bee10da5..62908c04 100644 --- a/noxfile.py +++ b/noxfile.py @@ -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() diff --git a/pyproject.toml b/pyproject.toml index ab4ed941..3e487866 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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]