From b60a32d269cd1d2841755da959ef73d781ed0592 Mon Sep 17 00:00:00 2001 From: Oliverpool Date: Thu, 22 Oct 2015 18:14:32 +0200 Subject: [PATCH] [test] fix Data folder via system call --- test/test_compilation/test_compilation.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/test_compilation/test_compilation.py b/test/test_compilation/test_compilation.py index c46844d5..ca94400e 100644 --- a/test/test_compilation/test_compilation.py +++ b/test/test_compilation/test_compilation.py @@ -8,7 +8,6 @@ import subprocess import unittest from patacrep.encoding import open_read -from patacrep import __DATADIR__ from .. import dynamic # pylint: disable=unused-import @@ -98,9 +97,13 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest): os.path.dirname(__file__), ) + datadir_command = ['python', '-c', 'from patacrep import __DATADIR__; print(__DATADIR__)'] + stdout = subprocess.check_output(datadir_command) + datadir = stdout.decode("utf-8").strip() + expected = expected.replace( "@DATA_FOLDER@", - __DATADIR__, + datadir, ) return super().assertMultiLineEqual(result, expected, msg)