1. Joseph Ilustre
  2. sphinx


timmartin  committed 95b881d

Fixed a bug in test_intl.py: teardown didn't get called if the test was skipped

  • Participants
  • Parent commits 5b94aee
  • Branches default

Comments (0)

Files changed (1)

File tests/test_intl.py

View file
  • Ignore whitespace
                 test_root / 'xx' / 'LC_MESSAGES' / '%s.mo' % catalog],
                 stdout=PIPE, stderr=PIPE)
         except OSError:
+            # The test will fail the second time it's run if we don't
+            # tear down here. Not sure if there's a more idiomatic way
+            # of ensuring that teardown gets run in the event of an
+            # exception from the setup function.
+            teardown_module()
             raise SkipTest  # most likely msgfmt was not found
             stdout, stderr = p.communicate()