From eae1bdba4e929bca59a8cd934d3e054d44feba6f Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sun, 4 Nov 2018 01:48:04 +0000 Subject: [PATCH] tests: make minify_test print something useful on failure --- tests/minify_test.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/minify_test.py b/tests/minify_test.py index e990fb90..d1161c90 100644 --- a/tests/minify_test.py +++ b/tests/minify_test.py @@ -95,7 +95,11 @@ class MitogenCoreTest(testlib.TestCase): def test_minify_all(self): for name in glob.glob('mitogen/*.py'): 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_line_counts_match(original, minified)