forked from certbot/certbot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix pytest on macOS in Travis (certbot#5360)
* Add tools/pytest.sh * pass TRAVIS through in tox.ini * Use tools/pytest.sh to run pytest * Add quiet to pytest.ini * ignore pytest cache
- Loading branch information
1 parent
ed2168a
commit 5388842
Showing
6 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,6 @@ tests/letstest/*.pem | |
tests/letstest/venv/ | ||
|
||
.venv | ||
|
||
# pytest cache | ||
/.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[pytest] | ||
addopts = --quiet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
# Runs pytest with the provided arguments, adding --numprocesses to the command | ||
# line. This argument is set to "auto" if the environmnent variable TRAVIS is | ||
# not set, otherwise, it is set to 2. This works around | ||
# https://github.com/pytest-dev/pytest-xdist/issues/9. Currently every Travis | ||
# environnment provides two cores. See | ||
# https://docs.travis-ci.com/user/reference/overview/#Virtualization-environments. | ||
|
||
if ${TRAVIS:-false}; then | ||
NUMPROCESSES="2" | ||
else | ||
NUMPROCESSES="auto" | ||
fi | ||
|
||
pytest --numprocesses "$NUMPROCESSES" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters