First positional argument for tox as test module/case path

pull/4879/head
Benjamin Bach 2018-10-29 11:28:05 +01:00 zatwierdzone przez Matt Westcott
rodzic 866d8c1602
commit 5b0f2e1a54
4 zmienionych plików z 15 dodań i 2 usunięć

Wyświetl plik

@ -8,6 +8,7 @@ Changelog
* Added `max_count` option on page models to limit the number of pages of a particular type that can be created (Dan Braghis)
* Document and image choosers now show the document / image's collection (Alejandro Garza, Janneke Janssen)
* Added new "Welcome to your Wagtail site" Starter Page when using wagtail start command (Timothy Allen, Scott Cranfill)
* Added ability to run individual tests through tox (Benjamin Bach)
* Fix: Query objects returned from `PageQuerySet.type_q` can now be merged with `|` (Brady Moe)
* Fix: Add `rel="noopener noreferrer"` to target blank links (Anselm Bradford)
* Fix: Additional fields on custom document models now show on the multiple document upload view (Robert Rollins, Sergey Fedoseev)

Wyświetl plik

@ -68,19 +68,30 @@ From the root of the Wagtail codebase, run the following command to run all the
At the time of writing, Wagtail has well over 2500 tests, which takes a while to
run. You can run tests for only one part of Wagtail by passing in the path as
an argument to ``runtests.py``:
an argument to ``runtests.py`` or ``tox``:
.. code-block:: console
$ # Running in the current environment
$ python runtests.py wagtail.core
$ # Running in a specified Tox environment
$ tox -e py36-dj20-sqlite-noelasticsearch wagtail.core
$ # See a list of available Tox environments
$ tox -l
You can also run tests for individual TestCases by passing in the path as
an argument to ``runtests.py``
.. code-block:: console
$ # Running in the current environment
$ python runtests.py wagtail.core.tests.test_blocks.TestIntegerBlock
$ # Running in a specified Tox environment
$ tox -e py36-dj20-sqlite-noelasticsearch wagtail.core.tests.test_blocks.TestIntegerBlock
**Running migrations for the test app models**
You can create migrations for the test app by running the following from the Wagtail root.

Wyświetl plik

@ -26,6 +26,7 @@ Other features
* Added ``max_count`` option on page models to limit the number of pages of a particular type that can be created (Dan Braghis)
* Document and image choosers now show the document / image's collection (Alejandro Garza, Janneke Janssen)
* New ``image_url`` template tag allows to generate dynamic image URLs, so image renditions are being created outside the main request which improves performance. Requires extra configuration, see :doc:`/advanced_topics/images/image_serve_view` (Yannick Chabbert, Dan Braghis).
* Added ability to run individual tests through tox (Benjamin Bach)
Bug fixes
~~~~~~~~~

Wyświetl plik

@ -30,7 +30,7 @@ commands =
elasticsearch2: coverage run runtests.py wagtail.search wagtail.documents wagtail.images --elasticsearch2
elasticsearch5: coverage run runtests.py wagtail.search wagtail.documents wagtail.images --elasticsearch5
elasticsearch6: coverage run runtests.py wagtail.search wagtail.documents wagtail.images --elasticsearch6
noelasticsearch: coverage run runtests.py
noelasticsearch: coverage run runtests.py {posargs}
basepython =
py34: python3.4