From f2ddb58fad69c06b82d669bdc1c12cec590c15bd Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauldmccarthy@gmail.com> Date: Fri, 3 Aug 2018 12:12:02 +0100 Subject: [PATCH] TEST: Fix windows edge case where test data is on different drive to tempdir --- tests/test_immv_imcp.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_immv_imcp.py b/tests/test_immv_imcp.py index 50a8a8745..36e9ddae1 100644 --- a/tests/test_immv_imcp.py +++ b/tests/test_immv_imcp.py @@ -359,7 +359,10 @@ def test_imcp_script_shouldPass(move=False): imcp_args[:-1] = [op.join(tindir, a) for a in imcp_args[:-1]] imcp_args[ -1] = op.join(toutdir, imcp_args[-1]) - imcp_args = [op.relpath(a, reldir) for a in imcp_args] + + for i, a in enumerate(imcp_args): + if op.splitdrive(a)[0] == op.splitdrive(reldir)[0]: + imcp_args[i] = op.relpath(a, reldir) print('indir before: ', os.listdir(tindir)) print('outdir before: ', os.listdir(toutdir)) -- GitLab