diff --git a/test/test_compilation/subdir.tex.control b/test/test_compilation/subdir.tex.control index f3374e33..32656938 100644 --- a/test/test_compilation/subdir.tex.control +++ b/test/test_compilation/subdir.tex.control @@ -16,7 +16,7 @@ {@TEST_FOLDER@/subdir_datadir/latex/} % {@TEST_FOLDER@/subdir_datadir2/latex/} % {@TEST_FOLDER@/latex/} % - {/home/travis/build/patacrep/patacrep/patacrep/data/latex/} % + {@PACKAGE_FOLDER@/data/latex/} % } \makeatother @@ -45,7 +45,7 @@ guitar, {@TEST_FOLDER@/subdir_datadir/} % {@TEST_FOLDER@/subdir_datadir2/} % {@TEST_FOLDER@/} % - {/home/travis/build/patacrep/patacrep/patacrep/data/} % + {@PACKAGE_FOLDER@/data/} % } diff --git a/test/test_compilation/test_compilation.py b/test/test_compilation/test_compilation.py index 159a821b..8d605c86 100644 --- a/test/test_compilation/test_compilation.py +++ b/test/test_compilation/test_compilation.py @@ -90,8 +90,15 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest): ) def assertMultiLineEqual(self, result, expected): - """Replace the paths with the local paths""" + """Replace the placeholder paths with the local paths""" + placeholder = "@TEST_FOLDER@" localpath = os.path.dirname(__file__) expected = expected.replace(placeholder, localpath) + + import patacrep + placeholder = "@PACKAGE_FOLDER@" + localpath = os.path.dirname(patacrep.__file__) + expected = expected.replace(placeholder, localpath) + return super().assertMultiLineEqual(result, expected)