File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -202,10 +202,13 @@ def test_parsing(self) -> None:
202202
203203
204204class TestGeneratorAgainstDbus (IsolatedDbusTestCase ):
205- def test_generate_from_connection (self ) -> None :
205+ def setUp (self ) -> None :
206206 if find_spec ('jinja2' ) is None :
207207 raise SkipTest ('Jinja2 not installed' )
208208
209+ super ().setUp ()
210+
211+ def test_generate_from_connection (self ) -> None :
209212 with patch ("sdbus.__main__.stdout" ) as stdout_mock :
210213 generator_main (
211214 [
@@ -234,9 +237,6 @@ def test_generate_from_connection(self) -> None:
234237 )
235238
236239 def test_generate_from_connection_blocking (self ) -> None :
237- if find_spec ('jinja2' ) is None :
238- raise SkipTest ('Jinja2 not installed' )
239-
240240 with patch ("sdbus.__main__.stdout" ) as stdout_mock :
241241 generator_main (
242242 [
@@ -275,6 +275,12 @@ def test_generate_from_connection_blocking(self) -> None:
275275
276276
277277class TestGeneratorSyntaxCompile (TestCase ):
278+ def setUp (self ) -> None :
279+ if find_spec ('jinja2' ) is None :
280+ raise SkipTest ('Jinja2 not installed' )
281+
282+ super ().setUp ()
283+
278284 def test_syntax_compile_async (self ) -> None :
279285 source_code = generate_py_file (
280286 interfaces_from_str (test_xml ),
You can’t perform that action at this time.
0 commit comments