summaryrefslogtreecommitdiff
path: root/tests/utils_tests/test_os_utils.py
diff options
context:
space:
mode:
authordjango-bot <ops@djangoproject.com>2022-02-03 20:24:19 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-02-07 20:37:05 +0100
commit9c19aff7c7561e3a82978a272ecdaad40dda5c00 (patch)
treef0506b668a013d0063e5fba3dbf4863b466713ba /tests/utils_tests/test_os_utils.py
parentf68fa8b45dfac545cfc4111d4e52804c86db68d3 (diff)
Refs #33476 -- Reformatted code with Black.
Diffstat (limited to 'tests/utils_tests/test_os_utils.py')
-rw-r--r--tests/utils_tests/test_os_utils.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/utils_tests/test_os_utils.py b/tests/utils_tests/test_os_utils.py
index 76c0eda944..7204167688 100644
--- a/tests/utils_tests/test_os_utils.py
+++ b/tests/utils_tests/test_os_utils.py
@@ -9,10 +9,7 @@ from django.utils._os import safe_join, to_path
class SafeJoinTests(unittest.TestCase):
def test_base_path_ends_with_sep(self):
drive, path = os.path.splitdrive(safe_join("/abc/", "abc"))
- self.assertEqual(
- path,
- "{0}abc{0}abc".format(os.path.sep)
- )
+ self.assertEqual(path, "{0}abc{0}abc".format(os.path.sep))
def test_root_path(self):
drive, path = os.path.splitdrive(safe_join("/", "path"))
@@ -34,9 +31,9 @@ class SafeJoinTests(unittest.TestCase):
class ToPathTests(unittest.TestCase):
def test_to_path(self):
- for path in ('/tmp/some_file.txt', Path('/tmp/some_file.txt')):
+ for path in ("/tmp/some_file.txt", Path("/tmp/some_file.txt")):
with self.subTest(path):
- self.assertEqual(to_path(path), Path('/tmp/some_file.txt'))
+ self.assertEqual(to_path(path), Path("/tmp/some_file.txt"))
def test_to_path_invalid_value(self):
with self.assertRaises(TypeError):