diff --git a/patacrep/songs/chordpro/syntax.py b/patacrep/songs/chordpro/syntax.py index 6379ca62..a1c69983 100644 --- a/patacrep/songs/chordpro/syntax.py +++ b/patacrep/songs/chordpro/syntax.py @@ -319,6 +319,5 @@ def parse_song(content, filename=None): lexer=ChordProLexer(filename=filename).lexer, ) if parsed_content is None: - # There was a fatal error parsing the content raise SyntaxError('Fatal error during song parsing: {}'.format(filename)) return parsed_content diff --git a/test/test_chordpro/test_parser.py b/test/test_chordpro/test_parser.py index d14bcb4d..f369748c 100644 --- a/test/test_chordpro/test_parser.py +++ b/test/test_chordpro/test_parser.py @@ -103,11 +103,7 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest): def _create_test(cls, base, dest): """Return a function testing that `base` compilation in `dest` format. """ - - def test_parse_render(self): - """Test that `base` is correctly parsed and rendered.""" - self.assertRender(base, dest) - + test_parse_render = lambda self: self.assertRender(base, dest) test_parse_render.__doc__ = ( "Test that '{base}' is correctly parsed and rendererd into '{format}' format." ).format(base=os.path.basename(base), format=dest) @@ -115,7 +111,7 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest): @classmethod def _create_failure(cls, base): - """Return a function testing that `base` fails. + """Return a function testing that `base` parsing fails. """ def test_parse_render(self):