forked from openedx/edx-platform
-
Notifications
You must be signed in to change notification settings - Fork 3
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 openedx#16957 from edx/jmbowman/PLAT-1858
PLAT-1858 Better capture of deprecation warnings
- Loading branch information
Showing
12 changed files
with
103 additions
and
42 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
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,6 +1,11 @@ | ||
[pytest] | ||
DJANGO_SETTINGS_MODULE = cms.envs.test | ||
addopts = --nomigrations --reuse-db --durations=20 -p no:randomly | ||
# Enable default handling for all warnings, including those that are ignored by default; | ||
# but hide rate-limit warnings, because we deliberately don't throttle test user logins | ||
filterwarnings = | ||
default | ||
ignore:No request passed to the backend, unable to rate-limit:UserWarning | ||
norecursedirs = envs | ||
python_classes = | ||
python_files = tests.py test_*.py *_tests.py |
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,6 +1,11 @@ | ||
[pytest] | ||
DJANGO_SETTINGS_MODULE = openedx.tests.settings | ||
addopts = --nomigrations --reuse-db --durations=20 | ||
# Enable default handling for all warnings, including those that are ignored by default; | ||
# but hide rate-limit warnings, because we deliberately don't throttle test user logins | ||
filterwarnings = | ||
default | ||
ignore:No request passed to the backend, unable to rate-limit:UserWarning | ||
norecursedirs = .cache | ||
python_classes = | ||
python_files = tests.py test_*.py tests_*.py *_tests.py __init__.py |
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,3 +1,8 @@ | ||
[pytest] | ||
addopts = -p no:randomly --durations=20 | ||
# Enable default handling for all warnings, including those that are ignored by default; | ||
# but hide rate-limit warnings, because we deliberately don't throttle test user logins | ||
filterwarnings = | ||
default | ||
ignore:No request passed to the backend, unable to rate-limit:UserWarning | ||
norecursedirs = .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
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
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,58 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
############################################################################### | ||
# | ||
# unit-tests.sh | ||
# | ||
# Execute Python unit tests for edx-platform. | ||
# | ||
# This script is typically called from generic-ci-tests.sh, which defines | ||
# these environment variables: | ||
# | ||
# `TEST_SUITE` defines which kind of test to run. | ||
# Possible values are: | ||
# | ||
# - "lms-unit": Run the LMS Python unit tests | ||
# - "cms-unit": Run the CMS Python unit tests | ||
# - "commonlib-unit": Run Python unit tests from the common/lib directory | ||
# | ||
# `SHARD` is a number indicating which subset of the tests to build. | ||
# | ||
# For "lms-unit", the tests are put into shard groups | ||
# using the 'attr' decorator (e.g. "@attr(shard=1)"). Anything with | ||
# the 'shard=n' attribute will run in the nth shard. If there isn't a | ||
# shard explicitly assigned, the test will run in the last shard. | ||
# | ||
# This script is broken out so it can be run by tox and redirect stderr to | ||
# the specified file before tox gets a chance to redirect it to stdout. | ||
# | ||
############################################################################### | ||
|
||
PAVER_ARGS="-v" | ||
PARALLEL="--processes=-1" | ||
|
||
case "${TEST_SUITE}" in | ||
|
||
"lms-unit") | ||
case "$SHARD" in | ||
"all") | ||
paver test_system -s lms --disable_capture ${PAVER_ARGS} ${PARALLEL} 2> lms-tests.log | ||
;; | ||
[1-3]) | ||
paver test_system -s lms --disable_capture --eval-attr="shard==$SHARD" ${PAVER_ARGS} ${PARALLEL} 2> lms-tests.${SHARD}.log | ||
;; | ||
4|"noshard") | ||
paver test_system -s lms --disable_capture --eval-attr='not shard' ${PAVER_ARGS} ${PARALLEL} 2> lms-tests.4.log | ||
;; | ||
esac | ||
;; | ||
|
||
"cms-unit") | ||
paver test_system -s cms --disable_capture ${PAVER_ARGS} 2> cms-tests.log | ||
;; | ||
|
||
"commonlib-unit") | ||
paver test_lib --disable_capture ${PAVER_ARGS} 2> common-tests.log | ||
;; | ||
esac |
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