Browse Source

Add LaTeX content test

pull/179/head
Oliverpool 9 years ago
parent
commit
2b06236076
  1. 5
      test/test_content/test_content.py
  2. 1
      test/test_content/tex.control
  3. 1
      test/test_content/tex.source

5
test/test_content/test_content.py

@ -9,7 +9,7 @@ import json
from patacrep.songs import DataSubpath, DEFAULT_CONFIG from patacrep.songs import DataSubpath, DEFAULT_CONFIG
from patacrep import content, files from patacrep import content, files
from patacrep.content import song, section, songsection from patacrep.content import song, section, songsection, tex
from .. import dynamic # pylint: disable=unused-import from .. import dynamic # pylint: disable=unused-import
@ -83,6 +83,9 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest):
elif isinstance(elem, songsection.SongSection): elif isinstance(elem, songsection.SongSection):
return "{}:{}".format(elem.keyword, elem.name) return "{}:{}".format(elem.keyword, elem.name)
elif isinstance(elem, tex.LaTeX):
return elem.filename
else: else:
raise Exception(elem) raise Exception(elem)

1
test/test_content/tex.control

@ -0,0 +1 @@
["test/test_content/datadir/songs/texfile.tex"]

1
test/test_content/tex.source

@ -0,0 +1 @@
[["tex", "texfile.tex", "chordpro.csg"]]
Loading…
Cancel
Save