From 9d74a41f5352a80a8554d5cb453e05279411d9df Mon Sep 17 00:00:00 2001 From: Oliverpool Date: Fri, 13 Nov 2015 13:10:13 +0100 Subject: [PATCH] improve test_parser docstring --- test/test_chordpro/test_parser.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/test_chordpro/test_parser.py b/test/test_chordpro/test_parser.py index 7b7db4b3..cd38afcd 100644 --- a/test/test_chordpro/test_parser.py +++ b/test/test_chordpro/test_parser.py @@ -20,9 +20,12 @@ OUTPUTS = ['csg', 'tsg', 'html'] class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest): """Test of chorpro parser, and several renderers. - For any given `foo.source`, it is parsed as a chordpro file, and should be - rendered as `foo.csg` with the chordpro renderer, and `foo.tsg` with the - latex renderer. + For any given `foo.input_format.source`, the file is parsed as `input_format` and + rendered as many times as a `foo.out_format` exists (if `out_format` is a supported + output format). + + For instance `foo.csg.source` (chordpro song) will be rendered as LaTeX, if a file + `foo.tsg` exitsts. The result of the rendering will be compared with the `foo.tsg` file. This class does nothing by itself, but its metaclass populates it with test methods testing parser and renderers. @@ -47,7 +50,7 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest): yield def assertRender(self, base, in_format, out_format): # pylint: disable=invalid-name - """Assert that `{base}.source` is correctly rendered in the `out_format`. + """Assert that `{base}.{in_format}.source` is correctly rendered in the `out_format`. """ sourcename = "{}.{}.source".format(base, in_format) destname = "{}.{}".format(base, out_format)