Skip to content

Commit

Permalink
chore: cleanup and harden pytest config (#1011)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
henryiii and joerick committed Feb 22, 2022
1 parent 2d1fee2 commit 45a211e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
6 changes: 4 additions & 2 deletions cibuildwheel/docker_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@ def __exit__(
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)

Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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()

Expand Down
9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 45a211e

Please sign in to comment.