From 89d585f0c2fdff4cf4a646cc22e5b7616c8097ca Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Wed, 26 Jan 2022 21:05:47 +0100 Subject: [PATCH] Updated the code for unix --- tests/modules/test_pathresolver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/test_pathresolver.py b/tests/modules/test_pathresolver.py index 6ee6357..a39cd10 100644 --- a/tests/modules/test_pathresolver.py +++ b/tests/modules/test_pathresolver.py @@ -2,7 +2,7 @@ import bootstraparse.modules.pathresolver as pathr import os import re -pathlike_regexp = r'^[A-z]\:\\.+[/\\]src[/\\]bootstraparse[/\\]?$' +pathlike_regexp = r'^([A-z]\:\\|/).+[/\\]src[/\\]bootstraparse[/\\]?$' test_path = '/a/b/c/test' test_path_win = test_path.replace('/', '\\') @@ -10,7 +10,7 @@ test_path_win = test_path.replace('/', '\\') def test_pathresolver(): path = pathr.pathresolver(test_path) assert path() == os.path.normpath(test_path) - assert path() == test_path_win + assert path().replace('/', '\\') == test_path_win assert path().replace('\\', '/') == test_path