Browse Source

Try to correctly resolve package path

pull/120/head
Oliverpool 9 years ago
parent
commit
83ec733d08
  1. 3
      test/test_compilation/test_compilation.py

3
test/test_compilation/test_compilation.py

@ -8,6 +8,7 @@ import subprocess
import unittest import unittest
from patacrep.encoding import open_read from patacrep.encoding import open_read
from pkg_resources import resource_filename
from .. import dynamic # pylint: disable=unused-import from .. import dynamic # pylint: disable=unused-import
@ -98,7 +99,7 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest):
import patacrep import patacrep
placeholder = "@PACKAGE_FOLDER@" placeholder = "@PACKAGE_FOLDER@"
localpath = os.path.dirname(patacrep.__file__) localpath = os.path.abspath(resource_filename(patacrep.__name__, ''))
expected = expected.replace(placeholder, localpath) expected = expected.replace(placeholder, localpath)
return super().assertMultiLineEqual(result, expected) return super().assertMultiLineEqual(result, expected)

Loading…
Cancel
Save