From 95db82f8f7df0acce7051a8dedf29b88e436f5ab Mon Sep 17 00:00:00 2001 From: vojtekb Date: Thu, 9 Feb 2017 18:34:16 +0100 Subject: [PATCH] py.test => pytest (#2173) py.test => pytest --- CONTRIBUTING.rst | 10 +++++----- README | 4 ++-- docs/tutorial/testing.rst | 2 +- setup.cfg | 2 +- tox.ini | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index d9cd2214..1c9c8912 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -38,7 +38,7 @@ Running the testsuite You probably want to set up a `virtualenv `_. -The minimal requirement for running the testsuite is ``py.test``. You can +The minimal requirement for running the testsuite is ``pytest``. You can install it with:: pip install pytest @@ -54,9 +54,9 @@ Install Flask as an editable package using the current source:: Then you can run the testsuite with:: - py.test + pytest -With only py.test installed, a large part of the testsuite will get skipped +With only pytest installed, a large part of the testsuite will get skipped though. Whether this is relevant depends on which part of Flask you're working on. Travis is set up to run the full testsuite when you submit your pull request anyways. @@ -79,11 +79,11 @@ plugin. This assumes you have already run the testsuite (see previous section): After this has been installed, you can output a report to the command line using this command:: - py.test --cov=flask tests/ + pytest --cov=flask tests/ Generate a HTML report can be done using this command:: - py.test --cov-report html --cov=flask tests/ + pytest --cov-report html --cov=flask tests/ Full docs on ``coverage.py`` are here: https://coverage.readthedocs.io diff --git a/README b/README index baea6b24..75c5e7b1 100644 --- a/README +++ b/README @@ -33,9 +33,9 @@ Good that you're asking. The tests are in the tests/ folder. To run the tests use the - `py.test` testing tool: + `pytest` testing tool: - $ py.test + $ pytest Details on contributing can be found in CONTRIBUTING.rst diff --git a/docs/tutorial/testing.rst b/docs/tutorial/testing.rst index dcf36594..26099375 100644 --- a/docs/tutorial/testing.rst +++ b/docs/tutorial/testing.rst @@ -46,7 +46,7 @@ At this point you can run the tests. Here ``pytest`` will be used. Run and watch the tests pass, within the top-level :file:`flaskr/` directory as:: - py.test + pytest Testing + setuptools -------------------- diff --git a/setup.cfg b/setup.cfg index cd282e48..0e97b0ba 100644 --- a/setup.cfg +++ b/setup.cfg @@ -8,4 +8,4 @@ universal = 1 license_file = LICENSE [tool:pytest] -norecursedirs = .* *.egg *.egg-info env* artwork docs +norecursedirs = .* *.egg *.egg-info env* artwork docs examples diff --git a/tox.ini b/tox.ini index 8d5a0f43..764b4030 100644 --- a/tox.ini +++ b/tox.ini @@ -11,7 +11,7 @@ commands = pip install -e examples/flaskr pip install -e examples/minitwit pip install -e examples/patterns/largerapp - py.test --cov=flask --cov-report html [] + pytest --cov=flask --cov-report html [] deps= pytest pytest-cov