From 0d8f341d82577cb6eb80be3b768cbf9960b84967 Mon Sep 17 00:00:00 2001 From: Caroline Borg Date: Mon, 8 Mar 2021 17:51:14 +0100 Subject: [PATCH] Fix #766 --- tests/test_unix.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_unix.py b/tests/test_unix.py index e7a6c6349..29f5436de 100644 --- a/tests/test_unix.py +++ b/tests/test_unix.py @@ -6,6 +6,7 @@ ) import os import unittest +import platform class TestUnixPath(unittest.TestCase): def test_join_with_slash(self): self.assertEqual("path/to/dir/file", join_with_slash("path/to/dir/", "file")) @@ -14,6 +15,9 @@ def test_join_with_slash(self): self.assertEqual("http://algorithms/part", join_with_slash("http://algorithms/", "part")) def test_full_path(self): + if platform.system() == "Windows": + self.skipTest("Test is not valid on Windows.") + file_name = "file_name" # Test full path relative expect_path = "{}/{}".format(os.getcwd(), file_name) @@ -36,6 +40,9 @@ def test_split(self): self.assertEqual("test.py", expect_result[1]) def test_simplify_path(self): + if platform.system() == "Windows": + self.skipTest("Test is not valid on Windows.") + self.assertEqual("/", simplify_path_v1("/../")) self.assertEqual("/home/foo", simplify_path_v1("/home//foo/")) self.assertEqual("/", simplify_path_v2("/../"))