summaryrefslogtreecommitdiff
path: root/tests/test_runner/tests.py
Commit message (Collapse)AuthorAgeFilesLines
* Refs #33476 -- Applied Black's 2023 stable style.David Smith2023-02-011-1/+0
| | | | | | | | Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0
* Refs #32655 -- Removed extra_tests argument for ↵Mariusz Felisiak2023-01-171-40/+0
| | | | | | DiscoverRunner.build_suite()/run_tests(). Per deprecation timeline.
* Refs #32446 -- Removed SERIALIZE test database setting per deprecation timeline.Mariusz Felisiak2023-01-171-25/+1
|
* Avoided assignment followed by immediate return.Nick Pope2022-10-311-2/+1
| | | | | | | | Identified using the following command: $ pcre2grep --line-number --multiline --recursive \ "(?s)(\n +)(\w+) = [^\n]+\1return \2;?$" \ django docs extras js_tests scripts tests
* Refs #34010 -- Made --debug-mode work for parallel tests using spawn.Adam Johnson2022-09-281-1/+6
| | | | | | Bug in 3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc. Thanks Kevin Renskers for the report.
* Fixed #33719 -- Fixed test command crash when running in parallel.Mariusz Felisiak2022-05-191-0/+41
| | | | | Thanks Pēteris Caune for the report. Regression in 3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc.
* Refs #31169 -- Prevented infinite loop in parallel tests with custom test ↵David Smith2022-03-171-0/+45
| | | | | | | | runner when using spawn. Regression in 3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc. Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Fixed #31169 -- Adapted the parallel test runner to use spawn.David Smith2022-03-151-6/+4
| | | | | Co-authored-by: Valz <ahmadahussein0@gmail.com> Co-authored-by: Nick Pope <nick@nickpope.me.uk>
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-071-290/+444
|
* Refs #31621 -- Fixed handling --parallel option in test management command ↵Mariusz Felisiak2021-08-191-0/+18
| | | | | | | and runtests.py. Regression in ae89daf46f83a7b39d599d289624c3377bfa4ab1. Thanks Tim Graham for the report.
* Refs #31621 -- Added more tests for test --parallel option.Mariusz Felisiak2021-08-191-1/+64
|
* Fixed #32655 -- Deprecated extra_tests argument for ↵Jacob Walls2021-07-161-0/+39
| | | | DiscoverRunner.build_suite()/run_tests().
* Fixed #32914 -- Prevented test --shuffle from skipping test methods.Chris Jerdonek2021-07-121-0/+26
| | | | | | | "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.
* Fixed #24522 -- Added a --shuffle option to DiscoverRunner.Chris Jerdonek2021-07-081-1/+66
|
* Refs #32655 -- Improved error if iter_test_cases() is passed a string.Chris Jerdonek2021-06-291-1/+9
|
* Fixed #32529 -- Delayed creating a test suite in build_suite().Chris Jerdonek2021-03-111-7/+8
|
* Refs #32489 -- Doc'd and tested iter_test_cases() support for an iterable of ↵Chris Jerdonek2021-03-111-0/+14
| | | | tests.
* Fixed #32516 -- Fixed reorder_suite() with duplicates and reverse=True.Chris Jerdonek2021-03-091-23/+50
|
* Fixed #32489 -- Added iter_test_cases() to iterate over a TestSuite.Chris Jerdonek2021-03-051-0/+81
| | | | | | This also makes partition_suite_by_type(), partition_suite_by_case(), filter_tests_by_tags(), and DiscoverRunner._get_databases() to use iter_test_cases().
* Fixed #32446 -- Deprecated SERIALIZE test database setting.Simon Charette2021-02-241-3/+12
| | | | | | | | | | | Whether or not the state of a test database should be serialized can be inferred from the set of databases allowed to be access from discovered TestCase/TransactionTestCase enabling the serialized_rollback feature which makes this setting unnecessary. This should make a significant test suite bootstraping time difference on large projects that didn't explicitly disable test database serialization.
* Fixed #29052 -- Made test database creation preserve alias order and prefer ↵Harm Geerts2021-02-161-1/+30
| | | | | | | | | | | | | | the "default" database. This fixes flushing test databases when two aliases point to the same database. Use a list() to store the test database aliases so the order remains stable by following the order of the connections. Also, always use the "default" database alias as the first alias to accommodate `migrate`. Previously `migrate` could be executed on a secondary alias which caused truncating the "default" database.
* Fixed isolation of test_runner.EmptyDefaultDatabaseTest.Mariusz Felisiak2020-12-101-5/+6
| | | | This fixes test_runner.test_debug_sql.TestDebugSQL. test_setupclass_exception when run in reverse.
* Refs #31811 -- Added optional timing outputs to the test runner.Ahmad A. Hussein2020-08-131-1/+6
|
* Corrected several typos in string literals and test names.Min ho Kim2019-08-071-1/+1
|
* Simplified temporary directory handling in AdminScriptTestCase.Jon Dufresne2019-02-051-9/+3
| | | | | | | | Use tempfile.TemporaryDirectory() in AdminScriptTestCase.setUp() to create and destroy a temporary directory for each test. It removes the need for individual tests to delete files. For test classes that don't use the temporary directory, inherit from SimpleTestCase.
* Refs #28478 -- Deprecated TestCase's allow_database_queries and multi_db in ↵Simon Charette2019-01-101-1/+1
| | | | favor of databases.
* Refs #26840 -- Corrected SQLite connection mocking in a setup_databases() test.Simon Charette2018-12-241-10/+22
| | | | | | | | | | | | The test was expecting connections used by DiscoverRunner.setup_databases() to be the ones defined in django.test.runner but this doesn't hold true since this method was made a proxy of django.test.utils.setup_databases. This broke the TransactionTestCase.serialized_rollback feature in the test suite because calls to create_db_test() cleared the test data persisted on connections objects. Added an assertions to prevent this from happening again.
* Renamed Sqlite and Sqlite3 references to SQLite.Nick Pope2018-12-221-2/+1
|
* Fixed #30023 -- Prevented SQLite schema alterations while foreign key checks ↵Simon Charette2018-12-151-4/+3
| | | | | | | | | | | | | are enabled. Prior to this change foreign key constraint references could be left pointing at tables dropped during operations simulating unsupported table alterations because of an unexpected failure to disable foreign key constraint checks. SQLite3 does not allow disabling such checks while in a transaction so they must be disabled beforehand. Thanks ezaquarii for the report and Carlton and Tim for the review.
* Fixed #29866 -- Made DiscoverRunner do tests tear down if running checks or ↵Jayden Kneller2018-10-301-0/+57
| | | | tests raises an exception.
* Fixed #29704 -- Fixed manage.py test --testrunner if it isn't followed by an ↵Matthijs Kooijman2018-08-231-0/+9
| | | | equals sign.
* Added manage.py test --testrunner tests.Matthijs Kooijman2018-08-231-2/+33
|
* Fixed #29559 -- Fixed TransactionTestCase.reset_sequences for auto-created ↵Oliver Sauder2018-07-111-0/+3
| | | | m2m through models.
* Refs #9804 -- Fixed test for sequence reset of M2M with inherited through model.Tim Graham2018-07-111-9/+14
|
* Added multi_db=True to test cases that access the 'other' db connection.Tim Graham2017-02-101-0/+1
| | | | Fixed a failure in the context processors tests when running in reverse on MySQL due to an extra query after refs #27683.
* Fixed spelling of "nonexistent".Tim Graham2017-02-031-1/+1
|
* Refs #23919 -- Removed django.test.mock Python 2 compatibility shim.Tim Graham2017-01-201-1/+2
|
* Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette2017-01-191-1/+1
|
* Refs #23919 -- Removed encoding preambles and future importsClaude Paroz2017-01-181-2/+0
|
* Refs #25415 -- Fixed/silenced check errors in Django's test suite.Adam Chainz2016-12-281-2/+0
|
* Fixed E305 flake8 warnings.Ramin Farajpour Cami2016-11-141-0/+1
|
* Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za2016-11-101-3/+3
|
* Fixed #27170 -- Added DatabaseWrapper class attributes to ease subclassing.Chris Jerdonek2016-09-081-3/+3
|
* Fixed #26840 -- Added test.utils.setup/teardown_databases().Andreas Pelme2016-08-171-6/+7
|
* Replaced use of TestCase.fail() with assertRaises().Tim Graham2016-06-281-16/+5
| | | Also removed try/except/fail antipattern that hides exceptions.
* Fixed E128 flake8 warnings in tests/.Tim Graham2016-04-081-2/+1
|
* Refs #26022 -- Used context manager version of assertRaises in tests.Hasan2016-01-291-1/+2
|
* Fixed #25999 -- Removed promotion of RemovedInNextVersionWarning to loud by ↵Tim Graham2016-01-141-28/+0
| | | | default.
* Fixed #25466 -- Added backwards compatibility aliases for LoaderOrigin and ↵Tim Graham2015-09-291-3/+3
| | | | | | StringOrigin. Thanks Simon Charette for the DeprecationInstanceCheck class.
* Removed RemovedInDjango110Warning.Tim Graham2015-09-231-2/+3
|