We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c287fb5 commit 365bc5cCopy full SHA for 365bc5c
1 file changed
tests/test_slots.py
@@ -8,10 +8,14 @@
8
import pickle
9
import weakref
10
from pathlib import Path
11
-
+from tempfile import TemporaryDirectory
12
from unittest import mock
13
14
import pytest
15
+try:
16
+ from sphinx.application import Sphinx
17
+except ImportError:
18
+ Sphinx = None
19
20
import attr
21
import attrs
@@ -745,10 +749,9 @@ def documented(self):
745
749
"""A very well documented function"""
746
750
return True
747
751
752
+
753
+@pytest.mark.skipif(Sphinx is None, reason="Sphinx is not installed")
748
754
def test_sphinx_autodocuments_cached_property():
- from tempfile import TemporaryDirectory
- from sphinx.builders.text import TextBuilder
- from sphinx.application import Sphinx
755
here = Path(__file__).parent
756
with TemporaryDirectory() as td:
757
tmp_path = Path(td)
0 commit comments