Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions django/db/backends/postgresql/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
@cached_property
def django_test_skips(self):
skips = {
"opclasses are PostgreSQL only.": {
"indexes.tests.SchemaIndexesNotPostgreSQLTests."
"test_create_index_ignores_opclasses",
},
"PostgreSQL requires casting to text.": {
"lookup.tests.LookupTests.test_textfield_exact_null",
},
Expand Down
3 changes: 2 additions & 1 deletion tests/indexes/tests.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import datetime
from unittest import skipUnless
from unittest import skipIf, skipUnless

from django.conf import settings
from django.db import connection
Expand Down Expand Up @@ -106,6 +106,7 @@ def test_alter_field_unique_false_removes_deferred_sql(self):
self.assertIn("charfield_added", str(editor.deferred_sql[0].parts["name"]))


@skipIf(connection.vendor == "postgresql", "No PostgreSQL tests")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused, this test was already skipped by django_test_skips. What does it change to use skipIf instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like an issue with django_test_skips and forkserver 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like an issue with django_test_skips and forkserver 🤔

It's a general issue with parallel tests execution with spawn and forkserver, see alternative PR #20012.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Mariusz. As you found out, yes this is an issue with django_test_skips and the parallel tests, reported by Jacob in the referenced ticket-36596 (and django_test_expected_failures are also affected). I'll continue the conversation in your PR.

class SchemaIndexesNotPostgreSQLTests(TransactionTestCase):
available_apps = ["indexes"]

Expand Down