Browse Source

Use a placeholder for the test folder

pull/120/head
Oliverpool 9 years ago
parent
commit
b1d7fa7a92
  1. 22
      test/test_compilation/subdir.tex.control
  2. 6
      test/test_compilation/test_compilation.py

22
test/test_compilation/subdir.tex.control

@ -13,10 +13,10 @@
\makeatletter
\def\input@path{ %
{/home/louis/projets/patacrep/patacrep/test/test_compilation/subdir_datadir/latex/} %
{/home/louis/projets/patacrep/patacrep/test/test_compilation/subdir_datadir2/latex/} %
{/home/louis/projets/patacrep/patacrep/test/test_compilation/latex/} %
{/home/louis/projets/patacrep/patacrep/patacrep/data/latex/} %
{@TEST_FOLDER@/subdir_datadir/latex/} %
{@TEST_FOLDER@/subdir_datadir2/latex/} %
{@TEST_FOLDER@/latex/} %
{/home/travis/build/patacrep/patacrep/patacrep/data/latex/} %
}
\makeatother
@ -42,10 +42,10 @@ guitar,
\usepackage{graphicx}
\graphicspath{ %
{/home/louis/projets/patacrep/patacrep/test/test_compilation/subdir_datadir/} %
{/home/louis/projets/patacrep/patacrep/test/test_compilation/subdir_datadir2/} %
{/home/louis/projets/patacrep/patacrep/test/test_compilation/} %
{/home/louis/projets/patacrep/patacrep/patacrep/data/} %
{@TEST_FOLDER@/subdir_datadir/} %
{@TEST_FOLDER@/subdir_datadir2/} %
{@TEST_FOLDER@/} %
{/home/travis/build/patacrep/patacrep/patacrep/data/} %
}
@ -160,15 +160,15 @@ Chordpro}[
Chordpro}[
by={
},
cov={/home/louis/projets/patacrep/patacrep/test/test_compilation/subdir_datadir/songs/./relative.png},
cov={@TEST_FOLDER@/subdir_datadir/songs/./relative.png},
]
\cover
\lilypond{/home/louis/projets/patacrep/patacrep/test/test_compilation/subdir_datadir/songs/./relative.ly}
\image{/home/louis/projets/patacrep/patacrep/test/test_compilation/subdir_datadir/songs/./relative.png}
\lilypond{@TEST_FOLDER@/subdir_datadir/songs/./relative.ly}
\image{@TEST_FOLDER@/subdir_datadir/songs/./relative.png}
\endsong

6
test/test_compilation/test_compilation.py

@ -89,3 +89,9 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest):
cwd=os.path.dirname(songbook),
)
def assertMultiLineEqual(self, result, expected):
"""Replace the paths with the local paths"""
placeholder = "@TEST_FOLDER@"
localpath = os.path.dirname(__file__)
expected = expected.replace(placeholder, localpath)
return super().assertMultiLineEqual(result, expected)

Loading…
Cancel
Save