py.test => pytest (#2173)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
py.test => pytest
authored by vojtekb · committed by Markus Unterwaditzer · parent 9e2807d · Browse files · 5 files·+10 added−10 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
5 files+10 added−10 removed
- other:+10 added−10 removed
Provenance
- Commit
95db82f- Tree
aacd20b- Author
vojtekb <vojtekb@gmail.com>- Committer
Markus Unterwaditzer <markus@unterwaditzer.net>- Parent
9e2807d
5 files changed+10 added−10 removed
modified:docs/tutorial/testing.rst+1 added-1 removed
44 unmodified lines45 46 Run and watch the tests pass, within the top-level :file:`flaskr/` 47 directory as::48 49- py.test49+ pytest50 51 Testing + setuptools52 --------------------53 43 unmodified linesmodified:CONTRIBUTING.rst+5 added-5 removed
36 unmodified lines37 38 You probably want to set up a `virtualenv39 <https://virtualenv.readthedocs.io/en/latest/index.html>`_.40 41-The minimal requirement for running the testsuite is ``py.test``. You can41+The minimal requirement for running the testsuite is ``pytest``. You can42 install it with::43 44 pip install pytest45 7 unmodified lines53 pip install --editable .54 55 Then you can run the testsuite with::56 57- py.test57+ pytest58 59-With only py.test installed, a large part of the testsuite will get skipped59+With only pytest installed, a large part of the testsuite will get skipped60 though. Whether this is relevant depends on which part of Flask you're working61 on. Travis is set up to run the full testsuite when you submit your pull62 request anyways.63 14 unmodified lines78 pip install pytest-cov79 80 After this has been installed, you can output a report to the command line using this command::81 82- py.test --cov=flask tests/82+ pytest --cov=flask tests/83 84 Generate a HTML report can be done using this command::85 86- py.test --cov-report html --cov=flask tests/86+ pytest --cov-report html --cov=flask tests/87 88 Full docs on ``coverage.py`` are here: https://coverage.readthedocs.io89 90 Caution24 unmodified linesmodified:README+2 added-2 removed
31 unmodified lines32 ~ Where are the tests?33 34 Good that you're asking. The tests are in the35 tests/ folder. To run the tests use the36- `py.test` testing tool:36+ `pytest` testing tool:37 38- $ py.test38+ $ pytest39 40 Details on contributing can be found in CONTRIBUTING.rst41 42 ~ Where can I get help?7 unmodified linesmodified:setup.cfg+1 added-1 removed
6 unmodified lines7 [metadata]8 license_file = LICENSE9 10 [tool:pytest]11-norecursedirs = .* *.egg *.egg-info env* artwork docs11+norecursedirs = .* *.egg *.egg-info env* artwork docs examplesmodified:tox.ini+1 added-1 removed
9 unmodified lines10 # We need to install those after Flask is installed.11 pip install -e examples/flaskr12 pip install -e examples/minitwit13 pip install -e examples/patterns/largerapp14- py.test --cov=flask --cov-report html []14+ pytest --cov=flask --cov-report html []15 deps=16 pytest17 pytest-cov18 greenlet15 unmodified lines