MCPcopy Index your code
hub / github.com/RustPython/RustPython / _norm

Function _norm

Lib/test/test_ntpath.py:49–54  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

47 return result[:result_len]
48
49def _norm(path):
50 if isinstance(path, (bytes, str, os.PathLike)):
51 return ntpath.normcase(os.fsdecode(path))
52 elif hasattr(path, "__iter__"):
53 return tuple(ntpath.normcase(os.fsdecode(p)) for p in path)
54 return path
55
56
57def tester(fn, wantResult):

Callers 3

testerFunction · 0.85
assertPathEqualMethod · 0.85
assertPathInMethod · 0.85

Calls 4

isinstanceFunction · 0.85
hasattrFunction · 0.85
normcaseMethod · 0.80
fsdecodeMethod · 0.80

Tested by

no test coverage detected