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

6
test/test_compilation/test_compilation.py

@ -89,3 +89,9 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest):
cwd=os.path.dirname(songbook), 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