PYTHON-3940 Pytest Config Improvements (#1373)

This commit is contained in:
Noah Stapp 2023-09-13 11:31:43 -07:00 committed by GitHub
parent ee9cf10976
commit 14640256cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 12 deletions

View File

@ -262,7 +262,7 @@ if [ -z "$GREEN_FRAMEWORK" ]; then
# causing this script to exit.
python -c "from bson import _cbson; from pymongo import _cmessage"
fi
python -m pytest -v $TEST_ARGS
python -m pytest -v --durations=5 --maxfail=10 $TEST_ARGS
else
python green_framework_test.py $GREEN_FRAMEWORK -v $TEST_ARGS
fi

View File

@ -3,3 +3,4 @@ testpaths =
test
norecursedirs = test/*
addopts = -ra --junitxml=xunit-results/TEST-results.xml
faulthandler_timeout = 1500

View File

@ -56,15 +56,6 @@ from pymongo.uri_parser import parse_uri
if HAVE_SSL:
import ssl
try:
# Enable the fault handler to dump the traceback of each running thread
# after a segfault.
import faulthandler
faulthandler.enable()
except ImportError:
pass
# Enable debug output for uncollectable objects. PyPy does not have set_debug.
if hasattr(gc, "set_debug"):
gc.set_debug(

View File

@ -47,7 +47,7 @@ deps =
pytest>=7
commands =
python --version
pytest -v {posargs}
pytest -v --durations=5 --maxfail=10 {posargs}
[testenv:test-eg]
description = run tests using run-tests.sh Evergreen script
@ -152,7 +152,7 @@ deps =
https://github.com/ajdavis/mongo-mockup-db/archive/master.zip
passenv = *
commands =
python -m pytest -v {posargs} ./test/mockupdb
{[testenv:test]commands} {posargs} ./test/mockupdb
[testenv:aws-secrets]
deps =