From 7361f836451f7606d936273a86833c5d977cb62f Mon Sep 17 00:00:00 2001 From: Oliverpool Date: Thu, 29 Oct 2015 22:39:23 +0100 Subject: [PATCH] Use path2posix everywhere --- test/test_compilation/test_compilation.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/test/test_compilation/test_compilation.py b/test/test_compilation/test_compilation.py index 84a457ac..eeac36b3 100644 --- a/test/test_compilation/test_compilation.py +++ b/test/test_compilation/test_compilation.py @@ -10,6 +10,7 @@ import unittest import logging from patacrep.encoding import open_read +from patacrep.files import path2posix from .. import dynamic # pylint: disable=unused-import @@ -67,16 +68,18 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest): expected = expectfile.read().strip() expected = expected.replace( "@TEST_FOLDER@", - os.path.dirname(__file__), + path2posix(os.path.dirname(__file__)), ) expected = expected.replace( "@DATA_FOLDER@", - subprocess.check_output( - [sys.executable, "-c", 'import patacrep, pkg_resources; print(pkg_resources.resource_filename(patacrep.__name__, "data"))'], # pylint: disable=line-too-long - universal_newlines=True, - cwd=os.path.dirname(songbook), - ).strip(), + path2posix( + subprocess.check_output( + [sys.executable, "-c", 'import patacrep, pkg_resources; print(pkg_resources.resource_filename(patacrep.__name__, "data"))'], # pylint: disable=line-too-long + universal_newlines=True, + cwd=os.path.dirname(songbook), + ).strip() + ), ) self.assertMultiLineEqual(