tests: make minify_test print something useful on failure

issue260
David Wilson 6 years ago
parent 802efa6ea6
commit eae1bdba4e

@ -95,7 +95,11 @@ class MitogenCoreTest(testlib.TestCase):
def test_minify_all(self): def test_minify_all(self):
for name in glob.glob('mitogen/*.py'): for name in glob.glob('mitogen/*.py'):
original = self.read_source(name) original = self.read_source(name)
minified = self.func(original) try:
minified = self.func(original)
except Exception:
print('file was: ' + name)
raise
self._test_syntax_valid(minified, name) self._test_syntax_valid(minified, name)
self._test_line_counts_match(original, minified) self._test_line_counts_match(original, minified)

Loading…
Cancel
Save