diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f661d656c..ceba6af1b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -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) diff --git a/docs/contributing/developing.rst b/docs/contributing/developing.rst index 36d8045a1..44a451061 100644 --- a/docs/contributing/developing.rst +++ b/docs/contributing/developing.rst @@ -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. diff --git a/docs/releases/2.4.rst b/docs/releases/2.4.rst index cae4eadce..99cb3f1ba 100644 --- a/docs/releases/2.4.rst +++ b/docs/releases/2.4.rst @@ -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 ~~~~~~~~~ diff --git a/tox.ini b/tox.ini index 9950ddf70..22e938012 100644 --- a/tox.ini +++ b/tox.ini @@ -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