Skip some non-Windows tests on Windows

Some tests will never pass on Windows due to differences in filesystems between
Windows and Linux.
This commit is contained in:
MinchinWeb 2019-08-20 19:01:39 -06:00
commit 2ee423017b
4 changed files with 31 additions and 7 deletions

View file

@ -717,6 +717,8 @@ class TestDateFormatter(unittest.TestCase):
class TestSanitisedJoin(unittest.TestCase):
@unittest.skipIf(platform == 'win32',
"Different filesystem root on Windows")
def test_detect_parent_breakout(self):
with six.assertRaisesRegex(
self,
@ -727,6 +729,8 @@ class TestSanitisedJoin(unittest.TestCase):
"../test"
)
@unittest.skipIf(platform == 'win32',
"Different filesystem root on Windows")
def test_detect_root_breakout(self):
with six.assertRaisesRegex(
self,
@ -737,6 +741,8 @@ class TestSanitisedJoin(unittest.TestCase):
"/test"
)
@unittest.skipIf(platform == 'win32',
"Different filesystem root on Windows")
def test_pass_deep_subpaths(self):
self.assertEqual(
utils.sanitised_join(