Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 70e7850

Browse files
authored
Merge pull request #11808 from eseiver/pytest
updates error message to run pytest instead of tests.py standalone
2 parents e010538 + 9f0325e commit 70e7850

File tree

6 files changed

+8
-6
lines changed

6 files changed

+8
-6
lines changed

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ test_script:
106106
- python -c "import matplotlib as m; m.use('tkagg'); import matplotlib.pyplot as plt; print(plt.get_backend())"
107107
# tests
108108
- echo The following args are passed to pytest %PYTEST_ARGS%
109-
- python tests.py %PYTEST_ARGS%
109+
- pytest %PYTEST_ARGS%
110110

111111
after_test:
112112
# After the tests were a success, build wheels with the static libs

doc/devel/contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ tools:
265265
* Code with a good unittest coverage (at least 70%, better 100%), check with::
266266

267267
python -mpip install coverage
268-
python tests.py --with-coverage
268+
pytest --cov=matplotlib --showlocals -v
269269

270270
* No pyflakes warnings, check with::
271271

doc/devel/release_guide.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ We use `travis-ci <https://travis-ci.org/matplotlib/matplotlib>`__ for
2020
continuous integration. When preparing for a release, the final
2121
tagged commit should be tested locally before it is uploaded::
2222

23-
python tests.py --processes=8 --process-timeout=300
23+
pytest -n 8 .
24+
2425

2526
In addition the following two tests should be run and manually inspected::
2627

doc/devel/testing.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ Running the tests is simple. Make sure you have pytest installed and run::
4646

4747
or::
4848

49-
python tests.py
49+
pytest .
50+
5051

5152
in the root directory of the distribution. The script takes a set of
5253
commands, such as:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
class NoopTestCommand(TestCommand):
122122
def __init__(self, dist):
123123
print("Matplotlib does not support running tests with "
124-
"'python setup.py test'. Please run 'python tests.py'.")
124+
"'python setup.py test'. Please run 'pytest'.")
125125

126126

127127
class BuildExtraLibraries(BuildExtCommand):

tools/triage_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ def launch(result_images, source):
376376
Triage image comparison test failures.
377377
378378
If no arguments are provided, it assumes you ran the tests at the
379-
top-level of a source checkout as `python tests.py`.
379+
top-level of a source checkout as `pytest .`.
380380
381381
Keys:
382382
left/right: Move between test, expected and diff images

0 commit comments

Comments
 (0)