From 48840847e539a0b45f7cf7696b255bb9c1c7b861 Mon Sep 17 00:00:00 2001 From: Oliverpool Date: Wed, 4 Nov 2015 08:57:36 +0100 Subject: [PATCH] Dynamically skip tex.control if non-existent --- test/test_compilation/test_compilation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test_compilation/test_compilation.py b/test/test_compilation/test_compilation.py index 11067c55..9bf24cc2 100644 --- a/test/test_compilation/test_compilation.py +++ b/test/test_compilation/test_compilation.py @@ -38,9 +38,6 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest): '*.sb', ))): base = songbook[:-len(".sb")] - control = "{}.tex.control".format(base) - if not os.path.exists(control): - continue yield ( "test_generation_{}".format(os.path.basename(base)), cls._create_generation_test(base), @@ -63,6 +60,9 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest): # Check generated tex control = "{}.tex.control".format(base) + if not os.path.exists(control): + raise unittest.SkipTest('No control file for {}'.format(songbook)) + tex = "{}.tex".format(base) with open_read(control) as expectfile: with open_read(tex) as latexfile: