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

Method test_normcase

Lib/test/test_ntpath.py:394–407  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

392 tester("ntpath.join('D:/a', './c:b')", 'D:\\a\\.\\c:b')
393
394 def test_normcase(self):
395 normcase = ntpath.normcase
396 self.assertEqual(normcase(''), '')
397 self.assertEqual(normcase(b''), b'')
398 self.assertEqual(normcase('ABC'), 'abc')
399 self.assertEqual(normcase(b'ABC'), b'abc')
400 self.assertEqual(normcase('\xc4\u0141\u03a8'), '\xe4\u0142\u03c8')
401 expected = '\u03c9\u2126' if sys.platform == 'win32' else '\u03c9\u03c9'
402 self.assertEqual(normcase('\u03a9\u2126'), expected)
403 if sys.platform == 'win32' or sys.getfilesystemencoding() == 'utf-8':
404 self.assertEqual(normcase('\xc4\u0141\u03a8'.encode()),
405 '\xe4\u0142\u03c8'.encode())
406 self.assertEqual(normcase('\u03a9\u2126'.encode()),
407 expected.encode())
408
409 def test_normcase_invalid_paths(self):
410 normcase = ntpath.normcase

Callers

nothing calls this directly

Calls 3

normcaseFunction · 0.50
assertEqualMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected