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

Method test_str

Lib/test/test_pathlib/test_join_windows.py:73–83  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

71 self.assertEqual(p / 'E:d:s', P('E:d:s'))
72
73 def test_str(self):
74 p = self.cls(r'a\b\c')
75 self.assertEqual(str(p), 'a\\b\\c')
76 p = self.cls(r'c:\a\b\c')
77 self.assertEqual(str(p), 'c:\\a\\b\\c')
78 p = self.cls('\\\\a\\b\\')
79 self.assertEqual(str(p), '\\\\a\\b\\')
80 p = self.cls(r'\\a\b\c')
81 self.assertEqual(str(p), '\\\\a\\b\\c')
82 p = self.cls(r'\\a\b\c\d')
83 self.assertEqual(str(p), '\\\\a\\b\\c\\d')
84
85 def test_parts(self):
86 P = self.cls

Callers

nothing calls this directly

Calls 3

strFunction · 0.85
clsMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected