Skip to content

Commit fbecc75

Browse files
authored
PYTHON-3844 Enable Pytest XML Reporting in Tox (mongodb#1330)
1 parent eed4a55 commit fbecc75

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.evergreen/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ functions:
565565
set -o xtrace
566566
# This is required for pypy3.7 UTF encoding
567567
export LC_ALL=en_US.UTF-8
568-
${PYTHON_BINARY} -m tox -e test-atlas
568+
${PYTHON_BINARY} -m tox -m test-atlas
569569
570570
"add aws auth variables to file":
571571
- command: shell.exec

pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
testpaths =
33
test
44
norecursedirs = test/*
5+
addopts = -ra --junitxml=xunit-results/TEST-results.xml

tox.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ deps =
4646
pytest>=7
4747
commands =
4848
python --version
49-
pytest -v -rs {posargs}
49+
pytest -v {posargs}
5050

5151
[testenv:test-encryption]
5252
description = run base unit tests with encryption enabled
5353
deps = {[testenv:test]deps}
5454
extras = encryption
5555
commands =
5656
python --version
57-
pytest {posargs}
57+
pytest -v {posargs}
5858

5959
[testenv:lint]
6060
description = run pre-commit
@@ -145,7 +145,7 @@ deps =
145145
{[testenv:test]deps}
146146
passenv = *
147147
commands =
148-
python -m pytest -v ./test/atlas/test_connection.py
148+
python -m pytest -v {posargs} ./test/atlas/test_connection.py
149149

150150
[testenv:test-mockupdb]
151151
description = run mockupdb tests
@@ -154,4 +154,4 @@ deps =
154154
https://github.com/ajdavis/mongo-mockup-db/archive/master.zip
155155
passenv = *
156156
commands =
157-
python -m pytest -v ./test/mockupdb
157+
python -m pytest -v {posargs} ./test/mockupdb

0 commit comments

Comments
 (0)