From 8891985a9338ab29e162ef4dccfc11e8272c76d6 Mon Sep 17 00:00:00 2001 From: Oliverpool Date: Thu, 29 Oct 2015 22:20:54 +0100 Subject: [PATCH] Force importing patacrep from the right place --- test/test_compilation/test_compilation.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/test_compilation/test_compilation.py b/test/test_compilation/test_compilation.py index 70c76b7c..7d9bb005 100644 --- a/test/test_compilation/test_compilation.py +++ b/test/test_compilation/test_compilation.py @@ -101,12 +101,21 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest): if steps: command.extend(['--steps', steps]) + if os.name == 'nt' and 'APPVEYOR' in os.environ: + # On windows, we need to pass the current env as argument + current_env = os.environ.copy() + # Force the pythonpath for AppVeyor + current_env['PYTHONPATH'] = 'C:\\projects\\patacrep\\.tox\\py34\\lib\\site-packages\\' + else: + current_env = None + try: subprocess.check_output( command, stderr=subprocess.STDOUT, universal_newlines=True, cwd=os.path.dirname(songbook), + env=current_env ) return 0 except subprocess.CalledProcessError as error: