MCPcopy Index your code
hub / github.com/python/cpython / test_normcase

Method test_normcase

Lib/test/test_genericpath.py:387–399  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

385 ]
386
387 def test_normcase(self):
388 normcase = self.pathmodule.normcase
389 # check that normcase() is idempotent
390 for p in ["FoO/./BaR", b"FoO/./BaR"]:
391 p = normcase(p)
392 self.assertEqual(p, normcase(p))
393
394 self.assertEqual(normcase(''), '')
395 self.assertEqual(normcase(b''), b'')
396
397 # check that normcase raises a TypeError for invalid types
398 for path in (None, True, 0, 2.5, [], bytearray(b''), {'o','o'}):
399 self.assertRaises(TypeError, normcase, path)
400
401 def test_splitdrive(self):
402 # splitdrive for non-NT paths

Callers

nothing calls this directly

Calls 3

normcaseFunction · 0.50
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected