Skip to content

Commit

Permalink
Fix keon#766, it now skips the failing tests on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
cawibo committed Mar 8, 2021
1 parent 7215b42 commit 2488adf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_unix.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand All @@ -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)
Expand All @@ -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("/../"))
Expand Down

0 comments on commit 2488adf

Please sign in to comment.