mirror of
https://github.com/django/django.git
synced 2025-06-24 04:49:11 +00:00
Removed @skipUnlessDBFeature silencing of nonexistent features.
This was added in 46c7707e50400e237cbd774a31ad801669ca3905 but is obsolete now that gis_tests are discovered separately. It's error-prone to ignore mistyped names.
This commit is contained in:
parent
8ede411a81
commit
f5df7ed7e6
@ -1593,9 +1593,7 @@ def skipIfDBFeature(*features):
|
||||
def skipUnlessDBFeature(*features):
|
||||
"""Skip a test unless a database has all the named features."""
|
||||
return _deferredSkip(
|
||||
lambda: not all(
|
||||
getattr(connection.features, feature, False) for feature in features
|
||||
),
|
||||
lambda: not all(getattr(connection.features, feature) for feature in features),
|
||||
"Database doesn't support feature(s): %s" % ", ".join(features),
|
||||
"skipUnlessDBFeature",
|
||||
)
|
||||
@ -1604,9 +1602,7 @@ def skipUnlessDBFeature(*features):
|
||||
def skipUnlessAnyDBFeature(*features):
|
||||
"""Skip a test unless a database has any of the named features."""
|
||||
return _deferredSkip(
|
||||
lambda: not any(
|
||||
getattr(connection.features, feature, False) for feature in features
|
||||
),
|
||||
lambda: not any(getattr(connection.features, feature) for feature in features),
|
||||
"Database doesn't support any of the feature(s): %s" % ", ".join(features),
|
||||
"skipUnlessAnyDBFeature",
|
||||
)
|
||||
|
@ -89,9 +89,9 @@ class SkippingTestCase(SimpleTestCase):
|
||||
raise ValueError
|
||||
|
||||
self._assert_skipping(test_func, ValueError)
|
||||
self._assert_skipping(test_func2, unittest.SkipTest)
|
||||
self._assert_skipping(test_func2, AttributeError)
|
||||
self._assert_skipping(test_func3, ValueError)
|
||||
self._assert_skipping(test_func4, unittest.SkipTest)
|
||||
self._assert_skipping(test_func4, AttributeError)
|
||||
|
||||
class SkipTestCase(SimpleTestCase):
|
||||
@skipUnlessDBFeature("missing")
|
||||
|
Loading…
x
Reference in New Issue
Block a user