Skip to content

Commit 45a211e

Browse files
henryiiijoerick
andauthored
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 <[email protected]> Co-authored-by: Joe Rickerby <[email protected]>
1 parent 2d1fee2 commit 45a211e

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

cibuildwheel/docker_container.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,11 @@ def __exit__(
100100
exc_tb: Optional[TracebackType],
101101
) -> None:
102102

103+
self.bash_stdin.write(b"exit 0\n")
104+
self.bash_stdin.flush()
105+
self.process.wait(timeout=30)
103106
self.bash_stdin.close()
104-
self.process.terminate()
105-
self.process.wait()
107+
self.bash_stdout.close()
106108

107109
assert isinstance(self.name, str)
108110

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
nox.options.sessions = ["lint", "check_manifest", "tests"]
88

9-
PYTHON_ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9"]
9+
PYTHON_ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10"]
1010

1111
DIR = Path(__file__).parent.resolve()
1212

pyproject.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,24 @@ build-backend = "setuptools.build_meta"
99

1010
[tool.black]
1111
line-length = 100
12-
target-version = ['py36', 'py37', 'py38', 'py39']
12+
target-version = ['py36', 'py37', 'py38', 'py39', 'py310']
1313

1414

1515
[tool.isort]
1616
profile = "black"
17-
multi_line_output = 3
1817

1918

2019
[tool.pytest.ini_options]
21-
minversion = 6.0
20+
minversion = "6.0"
21+
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
2222
junit_family = "xunit2"
2323
testpaths = [
2424
"test",
2525
"unit_test",
2626
]
27+
xfail_strict = true
28+
filterwarnings = ["error"]
29+
log_cli_level = "info"
2730

2831

2932
[tool.mypy]

0 commit comments

Comments
 (0)