|
@ -2,13 +2,14 @@ |
|
|
|
|
|
|
|
|
# pylint: disable=too-few-public-methods |
|
|
# pylint: disable=too-few-public-methods |
|
|
|
|
|
|
|
|
|
|
|
from pkg_resources import resource_filename |
|
|
import glob |
|
|
import glob |
|
|
import os |
|
|
import os |
|
|
import subprocess |
|
|
import subprocess |
|
|
import unittest |
|
|
import unittest |
|
|
|
|
|
|
|
|
from patacrep.encoding import open_read |
|
|
from patacrep.encoding import open_read |
|
|
from pkg_resources import resource_filename |
|
|
import patacrep |
|
|
|
|
|
|
|
|
from .. import dynamic # pylint: disable=unused-import |
|
|
from .. import dynamic # pylint: disable=unused-import |
|
|
|
|
|
|
|
@ -93,13 +94,14 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest): |
|
|
def assertMultiLineEqual(self, result, expected, msg=None): |
|
|
def assertMultiLineEqual(self, result, expected, msg=None): |
|
|
"""Replace the placeholder paths with the local paths""" |
|
|
"""Replace the placeholder paths with the local paths""" |
|
|
|
|
|
|
|
|
placeholder = "@TEST_FOLDER@" |
|
|
expected = expected.replace( |
|
|
localpath = os.path.dirname(__file__) |
|
|
"@TEST_FOLDER@", |
|
|
expected = expected.replace(placeholder, localpath) |
|
|
os.path.dirname(__file__), |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
import patacrep |
|
|
expected = expected.replace( |
|
|
placeholder = "@PACKAGE_FOLDER@" |
|
|
"@DATA_FOLDER@", |
|
|
localpath = os.path.abspath(resource_filename(patacrep.__name__, '')) |
|
|
os.path.abspath(resource_filename(patacrep.__name__, 'data')), |
|
|
expected = expected.replace(placeholder, localpath) |
|
|
) |
|
|
|
|
|
|
|
|
return super().assertMultiLineEqual(result, expected, msg) |
|
|
return super().assertMultiLineEqual(result, expected, msg) |
|
|