Skip to content

Commit d701d24

Browse files
committed
another try
1 parent 4e1cb7c commit d701d24

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/rest/client/test_media.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@
4747
from tests.test_utils import SMALL_PNG
4848
from tests.unittest import override_config
4949

50+
try:
51+
import lxml
52+
except ImportError:
53+
lxml = None # type: ignore[assignment]
54+
5055

5156
class UnstableMediaDomainBlockingTests(unittest.HomeserverTestCase):
5257
remote_media_id = "doesnotmatter"
@@ -163,10 +168,6 @@ def test_remote_media_thumbnail_normally_unblocked(self) -> None:
163168

164169

165170
class UnstableURLPreviewTests(unittest.HomeserverTestCase):
166-
try:
167-
import lxml
168-
except ImportError:
169-
lxml = None # type: ignore[assignment]
170171
if not lxml:
171172
skip = "url preview feature requires lxml"
172173

0 commit comments

Comments
 (0)