diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2025-10-28 11:21:52 +0100 |
|---|---|---|
| committer | Natalia <124304+nessita@users.noreply.github.com> | 2025-10-29 17:59:49 -0300 |
| commit | e217139f5364c3a2015268357ecae5ca8b6b884b (patch) | |
| tree | 497733dbc37cd4dc317c942a05e2a154e37c6758 | |
| parent | 32ef95796af07b4a953f708c8636cc567411df8c (diff) | |
[6.0.x] Fixed #36596 -- Made parallel test runner respect django_test_skips and django_test_expected_failures.
Backport of 9ba3f74a46d15f9f2f45ad4ef8cdd245a888e58e from main.
| -rw-r--r-- | django/db/backends/sqlite3/creation.py | 2 | ||||
| -rw-r--r-- | django/test/runner.py | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/django/db/backends/sqlite3/creation.py b/django/db/backends/sqlite3/creation.py index 8a07e0c417..d57bf9ee1f 100644 --- a/django/db/backends/sqlite3/creation.py +++ b/django/db/backends/sqlite3/creation.py @@ -155,5 +155,3 @@ class DatabaseCreation(BaseDatabaseCreation): # connection. self.connection.connect() target_db.close() - if os.environ.get("RUNNING_DJANGOS_TEST_SUITE") == "true": - self.mark_expected_failures_and_skips() diff --git a/django/test/runner.py b/django/test/runner.py index fe90665d7f..ecae164d7f 100644 --- a/django/test/runner.py +++ b/django/test/runner.py @@ -474,6 +474,11 @@ def _init_worker( if value := serialized_contents.get(alias): connection._test_serialized_contents = value connection.creation.setup_worker_connection(_worker_id) + if ( + is_spawn_or_forkserver + and os.environ.get("RUNNING_DJANGOS_TEST_SUITE") == "true" + ): + connection.creation.mark_expected_failures_and_skips() if is_spawn_or_forkserver: call_command( |
