From 46ab0b047f372219af74acc9e91e7604eff7c393 Mon Sep 17 00:00:00 2001 From: Oliverpool Date: Thu, 12 Nov 2015 11:39:50 +0100 Subject: [PATCH] Code cleaning --- patacrep/songs/chordpro/syntax.py | 1 - test/test_chordpro/test_parser.py | 8 ++------ 2 files changed, 2 insertions(+), 7 deletions(-) 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):