I noticed this issue when finding a test isolation issue while working on
#24522. The test
`test_runner.test_discover_runner.DiscoverRunnerTests.test_name_patterns`
passes `test_name_patterns` to `DiscoverRunner`:
https://github.com/django/django/blob/e703b152c6148ddda1b072a4353e9a41dca87f90/tests/test_runner/test_discover_runner.py#L119-L122
And this causes some later tests to fail.
--
Ticket URL: <https://code.djangoproject.com/ticket/32808>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Accepted
Comment:
Good catch! A minimal set of tests to reproduce:
{{{
./runtests.py
test_runner.test_discover_runner.DiscoverRunnerTests.test_name_patterns
test_runner.tests.TestSuiteTests --parallel=1
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32808#comment:1>
Comment (by Chris Jerdonek):
Thanks! Yes, or even smaller--
{{{
$ ./runtests.py
test_runner.test_discover_runner.DiscoverRunnerTests.test_name_patterns
test_runner.tests.TestSuiteTests.test_iter_test_cases_mixed_test_suite_classes
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32808#comment:2>
* owner: nobody => Mariusz Felisiak
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/32808#comment:3>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/14478 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/32808#comment:4>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"62e8f369c3bdb7dbfe76d128437c0a9c0715a067" 62e8f369]:
{{{
#!CommitTicketReference repository=""
revision="62e8f369c3bdb7dbfe76d128437c0a9c0715a067"
Fixed #32808 -- Prevented DiscoverRunner.build_suite() from mutating test
loader patterns.
Thanks Chris Jerdonek for the report and reviews.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32808#comment:5>