Changes between Version 1 and Version 2 of Ticket #32611


Ignore:
Timestamp:
Apr 2, 2021, 11:01:45 PM (3 years ago)
Author:
Chris Jerdonek
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32611 – Description

    v1 v2  
    11Currently, `runtest.py`'s [https://github.com/django/django/blob/main/tests/runtests.py#L346 bisect_tests()] and [https://github.com/django/django/blob/main/tests/runtests.py#L397 paired_tests()] both call `runtest.py`'s `setup()` and `teardown()`. However, it doesn't seem like they need to (in full).
    22
    3 The `setup()` function's primary purpose is to temporarily set `settings` for the purposes of the test run, but `bisect_tests()` and `paired_tests()` both run tests in a subprocess, so settings modification doesn't seem like it should be necessary. The only things the call to `setup()` seem to be needed for in these two cases is to (1) do some initial logging of the test run, and (2) to do some work to compute `test_labels` in the case that `test_labels` aren't provided. So those could be factored out.
     3The `setup()` function's primary purpose is to temporarily set `settings` for the purposes of the test run, but `bisect_tests()` and `paired_tests()` both run tests in a subprocess, so settings modification doesn't seem like it should be necessary. The only things the call to `setup()` seem to be needed for in these two cases is to (1) do some initial logging of the test run, and (2) do some work to compute `test_labels` in the case that `test_labels` aren't provided. So those pieces could be factored out.
    44
    55Here is the commit where the calls to `setup()` were first added: https://github.com/django/django/commit/18c3ea5546566e8fe1471ea87942b2864040452d
Back to Top