|
@ -10,6 +10,7 @@ import unittest |
|
|
import logging |
|
|
import logging |
|
|
|
|
|
|
|
|
from patacrep.encoding import open_read |
|
|
from patacrep.encoding import open_read |
|
|
|
|
|
from patacrep.files import path2posix |
|
|
|
|
|
|
|
|
from .. import dynamic # pylint: disable=unused-import |
|
|
from .. import dynamic # pylint: disable=unused-import |
|
|
|
|
|
|
|
@ -67,16 +68,18 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest): |
|
|
expected = expectfile.read().strip() |
|
|
expected = expectfile.read().strip() |
|
|
expected = expected.replace( |
|
|
expected = expected.replace( |
|
|
"@TEST_FOLDER@", |
|
|
"@TEST_FOLDER@", |
|
|
os.path.dirname(__file__), |
|
|
path2posix(os.path.dirname(__file__)), |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
expected = expected.replace( |
|
|
expected = expected.replace( |
|
|
"@DATA_FOLDER@", |
|
|
"@DATA_FOLDER@", |
|
|
|
|
|
path2posix( |
|
|
subprocess.check_output( |
|
|
subprocess.check_output( |
|
|
[sys.executable, "-c", 'import patacrep, pkg_resources; print(pkg_resources.resource_filename(patacrep.__name__, "data"))'], # pylint: disable=line-too-long |
|
|
[sys.executable, "-c", 'import patacrep, pkg_resources; print(pkg_resources.resource_filename(patacrep.__name__, "data"))'], # pylint: disable=line-too-long |
|
|
universal_newlines=True, |
|
|
universal_newlines=True, |
|
|
cwd=os.path.dirname(songbook), |
|
|
cwd=os.path.dirname(songbook), |
|
|
).strip(), |
|
|
).strip() |
|
|
|
|
|
), |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
self.assertMultiLineEqual( |
|
|
self.assertMultiLineEqual( |
|
|