MCPcopy
hub / github.com/django/django / test_root_path

Method test_root_path

tests/utils_tests/test_os_utils.py:178–189  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

176 self.assertEqual(path, "{0}abc{0}abc".format(os.path.sep))
177
178 def test_root_path(self):
179 drive, path = os.path.splitdrive(safe_join("/", "path"))
180 self.assertEqual(
181 path,
182 "{}path".format(os.path.sep),
183 )
184
185 drive, path = os.path.splitdrive(safe_join("/", ""))
186 self.assertEqual(
187 path,
188 os.path.sep,
189 )
190
191 def test_parent_path(self):
192 with self.assertRaises(SuspiciousFileOperation):

Callers

nothing calls this directly

Calls 2

safe_joinFunction · 0.90
formatMethod · 0.45

Tested by

no test coverage detected