Browse Source

Improve latex tests

pull/177/head
Oliverpool 9 years ago
parent
commit
ea1113d43d
  1. 1
      test/test_song/greensleeves_latex.crlf.tsg
  2. 2
      test/test_song/greensleeves_latex.crlf.tsg.source
  3. 1
      test/test_song/greensleeves_latex.tsg
  4. 0
      test/test_song/greensleeves_latex.tsg.source
  5. 6
      test/test_song/test_parser.py

1
test/test_song/greensleeves_latex.crlf.tsg

@ -0,0 +1 @@
\import{@TEST_FOLDER@/}{greensleeves_latex.crlf.tsg.source}

2
test/test_song/greensleeves_latex.crlf.tsg.source

@ -0,0 +1,2 @@
# This content will be overwritten with `greensleeves_latex.tsg.source` content
# with windows line endings (CRLF) - for testing purposes

1
test/test_song/greensleeves_latex.tsg

@ -0,0 +1 @@
\import{@TEST_FOLDER@/}{greensleeves_latex.tsg.source}

0
test/test_song/greensleeves.tsg.source → test/test_song/greensleeves_latex.tsg.source

6
test/test_song/test_parser.py

@ -61,9 +61,13 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest):
with open_read(destname) as expectfile: with open_read(destname) as expectfile:
with disable_logging(): with disable_logging():
song = self.song_plugins[out_format][in_format](sourcename, self.config) song = self.song_plugins[out_format][in_format](sourcename, self.config)
expected = expectfile.read().strip().replace(
"@TEST_FOLDER@",
files.path2posix(resource_filename(__name__, "")),
)
self.assertMultiLineEqual( self.assertMultiLineEqual(
song.render().strip(), song.render().strip(),
expectfile.read().strip(), expected,
) )
@classmethod @classmethod

Loading…
Cancel
Save