-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #190 from modlinltd/ps/update-tests
chore: update tests to run properly with tox
- Loading branch information
Showing
4 changed files
with
30 additions
and
9 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/env bash | ||
set -e # Exit immediately if a command exits with a non-zero status. | ||
|
||
# Run tests and check code style. Executed from tox (see tox.ini) | ||
# | ||
# this is required due to an issue with generic types used in asgiref and | ||
# pypy's support for them: | ||
# https://github.com/django/asgiref/issues/393 | ||
|
||
echo "Running tox env $TOX_ENV_NAME" | ||
if [[ $TOX_ENV_NAME = pypy* ]]; then | ||
echo "Running tests without coverage" | ||
pytest . | ||
else | ||
echo "Running tests with coverage" | ||
pytest --cov-append . | ||
fi | ||
echo "Checking code style" | ||
pycodestyle --exclude=urls.py,migrations,.ropeproject -v advanced_filters |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
coveralls | ||
factory-boy==2.12.0 | ||
pycodestyle==2.5.0 | ||
pytest-django==3.9.0 | ||
pytest-cov | ||
coveralls==3.3.1 | ||
factory-boy==3.3.0 | ||
pycodestyle==2.10.0 | ||
pytest-django==4.5.2 | ||
pytest-cov==4.1.0 |
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