We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e42bdf8 commit 0830ef3Copy full SHA for 0830ef3
1 file changed
src/undate/test_utils.py
@@ -15,12 +15,14 @@ def test_django_functionality():
15
"""
16
17
import pytest
18
+from types import ModuleType
19
20
+django: ModuleType | None = None
21
try:
- import django
22
+ import django # type: ignore[import-not-found, no-redef]
23
except ImportError:
- django = None
24
+ pass
25
26
skipif_no_django = pytest.mark.skipif(django is None, reason="requires Django")
27
-skipif_django = pytest.mark.skipif(django, reason="requires no Django")
28
+skipif_django = pytest.mark.skipif(django is not None, reason="requires no Django")
0 commit comments