summaryrefslogtreecommitdiff
path: root/django/test
AgeCommit message (Collapse)Author
2022-01-07[4.0.x] Fixed #33410 -- Fixed recursive capturing of callbacks by ↵Petter Friberg
TestCase.captureOnCommitCallbacks(). Regression in d89f976bddb49fb168334960acc8979c3de991fa. Backport of bc174e6ea0ce676c5a7f467bda9739e6ef6b6186 from main
2021-12-08[4.0.x] Fixed #33346 -- Fixed SimpleTestCase.assertFormsetError() crash on a ↵Baptiste Mispelon
formset named "form". Thanks OutOfFocus4 for the report. Regression in 456466d932830b096d39806e291fe23ec5ed38d5. Backport of cb383753c0e0eb52306e1024d32a782549c27e61 from main.
2021-10-20[4.0.x] Refs #32956 -- Capitalized HTTP/HTTPS in comments, docs, and docstrings.David Smith
Backport of 7ef0bc922c0a78667ed8cbf5f85845b627ccbdf8 from main
2021-10-19[4.0.x] Refs #32956 -- Changed docs to treat the acronym HTTP phonetically.David Smith
Backport of 69b0736fad1d1f0197409ca025b7bcdf5666ae62 from main
2021-10-11[4.0.x] Fixed #33149 -- Made test runner --pdb option work with subTest().Abhyudai
Thanks Lucidot for the report and Mariusz Felisiak for the initial patch. Backport of 7872971dfbb818177168e64c24a933e48ce01206 from main
2021-09-24[4.0.x] Fixed #33132 -- Fixed test client handling of querystring only ↵Jaap Roes
redirects. Regression in 1e5aa8e1c79252cc810af21294a6e945d11d37b3. Backport of b1bf8c8a4ba04049dc19217bf0e876488a4fae3c from main
2021-08-30Fixed #33054 -- Made TestCase.captureOnCommitCallbacks() capture callbacks ↵Eugene Morozov
recursively.
2021-08-24Fixed #32552 -- Added logger argument to DiscoverRunner.Chris Jerdonek
2021-08-19Refs #31621 -- Fixed handling --parallel option in test management command ↵Mariusz Felisiak
and runtests.py. Regression in ae89daf46f83a7b39d599d289624c3377bfa4ab1. Thanks Tim Graham for the report.
2021-08-05Fixed #32988 -- Prevented creation of more test databases than TestCases.Mariusz Felisiak
DiscoverRunner.parallel is used in setup_databases() and teardown_databases() to control the number of test databases. Regression in cb6c19749d342c3dc0f97d89ff6887b220cf45b8.
2021-08-03Fixed #31621 -- Added support for '--parallel auto' to test management command.Adam Johnson
2021-07-29Fixed 32956 -- Lowercased spelling of "web" and "web framework" where ↵David Smith
appropriate.
2021-07-16Fixed #32655 -- Deprecated extra_tests argument for ↵Jacob Walls
DiscoverRunner.build_suite()/run_tests().
2021-07-15Fixed #32929 -- Fixed handling query strings in AsyncRequestFactory.pochangl
2021-07-12Fixed #32914 -- Prevented test --shuffle from skipping test methods.Chris Jerdonek
"test --shuffle" skipped test methods when test classes were mixed. This changes runner.py's reorder_tests() to group by TestCase class. Regression in 90ba716bf060ee7fef79dc230b0b20644839069f.
2021-07-09Refs #24522 -- Fixed code comment about seeds in Shuffler.__init__().Chris Jerdonek
2021-07-08Fixed #24522 -- Added a --shuffle option to DiscoverRunner.Chris Jerdonek
2021-07-05Refs #32508 -- Raised ImproperlyConfigured/TypeError instead of using "assert".Mateo Radman
2021-06-29Refs #32655 -- Improved error if iter_test_cases() is passed a string.Chris Jerdonek
2021-06-23Fixed #32790 -- Ensured test Client handles redirects to domain indexes ↵tomhamiltonstubber
without a specified trailing slash.
2021-06-10Fixed #32609 -- Updated runtests.py to support directory path test labels.Chris Jerdonek
For example, with this change, the following now works from the tests directory: $ ./runtests.py view_tests/tests/
2021-06-10Refs #27734 -- Prevented creation of more parallel workers than TestCases.Ceesjan Luiten
The parallel test runner uses multiple workers to distribute the workload. These workers are assigned a worker ID using a globally incremented variable, which determines what test database to connect to. When the worker ID surpasses the test database IDs Django will crash. This reduce likelihood of crashing parallel tests because ParallelTestSuite will no longer create more workers than TestCases. It won't eliminate the problem completely though because there are other circumstances in which new workers can be created which can then be assigned an "illegal" worker ID.
2021-06-08Refs #32355 -- Used addClassCleanup() in SimpleTestCase and SerializeMixin.Mariusz Felisiak
2021-06-04Made SerializeMixin check lockfile attr at import time.Adam Johnson
2021-06-03Fixed #32808 -- Prevented DiscoverRunner.build_suite() from mutating test ↵Mariusz Felisiak
loader patterns. Thanks Chris Jerdonek for the report and reviews.
2021-06-02Refs #32641 -- Made DiscoverRunner's "Found X tests" message work for ↵Chris Jerdonek
finding one test. This also removes passing level to log() as logging.INFO is the default.
2021-06-01Refs #32552 -- Added DiscoverRunner.log() to allow customization.Daniyal
Thanks Carlton Gibson, Chris Jerdonek, and David Smith for reviews.
2021-04-15Fixed #32641 -- Made DiscoverRunner print the number of found tests.girishsontakke
Thanks Chris Jerdonek for reviews.
2021-04-12Fixed #32416 -- Made ThreadedWSGIServer close connections after each thread.Chris Jerdonek
ThreadedWSGIServer is used by LiveServerTestCase.
2021-04-12Refs #32416 -- Added LiveServerTestCase._make_connections_override() hook.Chris Jerdonek
2021-04-02Fixed #32532 -- Made DiscoverRunner raise RuntimeError when a test label is ↵Chris Jerdonek
a file path.
2021-04-02Refs #32532 -- Replaced is_discoverable() with try_importing().Chris Jerdonek
2021-03-30Fixed #29127 -- Prevented DiscoverRunner from hiding tagged test with syntax ↵Chris Jerdonek
errors. This mades _FailedTest objects always match tags in DiscoverRunner.
2021-03-29Simplified and optimized test_match_tags().Chris Jerdonek
This simplifies and optimizes runner.py's test_match_tags() because it (1) uses isdisjoint() instead of intersection(), which involves constructing a new set, (2) eliminates a set operation when tags is falsey, (3) eliminates the need for a matched_tags variable, and (4) uses fewer not's, which should make it easier to parse and understand.
2021-03-26Fixed #32591 -- Made DiscoverRunner order _FailedTest objects first.Chris Jerdonek
Failures detected when loading tests are ordered before all of the above for quicker feedback. This includes things like test modules that couldn't be found or that couldn't be loaded due to syntax errors.
2021-03-24Fixed typo in DiscoverRunner --reverse help text.Chris Jerdonek
2021-03-24Refs #32532 -- Added DiscoverRunner.load_tests_for_label().Chris Jerdonek
2021-03-19Fixed #32556 -- Fixed handling empty string as non-boolean attributes value ↵Baptiste Mispelon
by assertHTMLEqual().
2021-03-19Refs #32556 -- Added django.test.html.normalize_attributes().Baptiste Mispelon
2021-03-18Fixed #32556 -- Fixed assertHTMLEqual() to handle empty string as boolean ↵Hasan Ramezani
attributes value.
2021-03-18Fixed #31370 -- Added support for parallel tests with --buffer.Adam Johnson
2021-03-18Refs #31370 -- Made RemoteTestResult subclass unittest.TestResult.Adam Johnson
2021-03-18Fixed #32547 -- Corrected notes about validation in HTML assertions docs.Hasan Ramezani
2021-03-17Fixed #32560 -- Fixed test runner with --pdb and --buffer on fail/error.Adam Johnson
2021-03-15Fixed #32540 -- Optimized DiscoverRunner.build_suite() by calling ↵Chris Jerdonek
find_top_level() only if is_discoverable() is true.
2021-03-15Refs #32540 -- Added django.test.runner.find_top_level().Chris Jerdonek
2021-03-12Reduced nesting inside DiscoverRunner.build_suite().Chris Jerdonek
2021-03-11Fixed #32529 -- Delayed creating a test suite in build_suite().Chris Jerdonek
2021-03-11Refs #32489 -- Doc'd and tested iter_test_cases() support for an iterable of ↵Chris Jerdonek
tests.
2021-03-10Refs #31235 -- Improved assertQuerysetEqual() warning message with stacklevel=2.Claude Paroz