From 83ec733d0807067a6abf45533050d5e874e5749d Mon Sep 17 00:00:00 2001 From: Oliverpool Date: Thu, 22 Oct 2015 15:38:09 +0200 Subject: [PATCH] Try to correctly resolve package path --- test/test_compilation/test_compilation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_compilation/test_compilation.py b/test/test_compilation/test_compilation.py index 8d605c86..4cdcdc64 100644 --- a/test/test_compilation/test_compilation.py +++ b/test/test_compilation/test_compilation.py @@ -8,6 +8,7 @@ import subprocess import unittest from patacrep.encoding import open_read +from pkg_resources import resource_filename from .. import dynamic # pylint: disable=unused-import @@ -98,7 +99,7 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest): import patacrep placeholder = "@PACKAGE_FOLDER@" - localpath = os.path.dirname(patacrep.__file__) + localpath = os.path.abspath(resource_filename(patacrep.__name__, '')) expected = expected.replace(placeholder, localpath) return super().assertMultiLineEqual(result, expected)