diff options
author | 2023-02-07 02:53:36 -0500 | |
---|---|---|
committer | 2023-02-07 02:53:36 -0500 | |
commit | 8f2b323b083de318351cc856c7eeee5f44537253 (patch) | |
tree | ca8ed5a90876cdece7d2b022e88e9a28b598f910 /tests | |
parent | Fix unit tests for new failmail emoji (diff) |
Add skip condition for windows not able to test path escapes
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bot/exts/utils/snekbox/test_io.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/bot/exts/utils/snekbox/test_io.py b/tests/bot/exts/utils/snekbox/test_io.py index 36ac720ba..a544a2056 100644 --- a/tests/bot/exts/utils/snekbox/test_io.py +++ b/tests/bot/exts/utils/snekbox/test_io.py @@ -1,11 +1,15 @@ -import unittest +import platform +from unittest import TestCase, skipIf # noinspection PyProtectedMember from bot.exts.utils.snekbox import _io -class SnekboxIOTests(unittest.TestCase): +class SnekboxIOTests(TestCase): # noinspection SpellCheckingInspection + # Skip Windows since both pathlib and os strips the escape sequences + # and many of these aren't valid Windows file paths + @skipIf(platform.system() == "Windows", "File names normalizer tests requires Unix-like OS.") def test_normalize_file_name(self): """Invalid file names should be normalized.""" cases = [ |