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

Method test_string

Lib/test/test_reprlib.py:53–65  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

51 self.assertEqual(getattr(r1, attr), getattr(r2, attr), msg=attr)
52
53 def test_string(self):
54 eq = self.assertEqual
55 eq(r("abc"), "'abc'")
56 eq(r("abcdefghijklmnop"),"'abcdefghijklmnop'")
57
58 s = "a"*30+"b"*30
59 expected = repr(s)[:13] + "..." + repr(s)[-14:]
60 eq(r(s), expected)
61
62 eq(r("\"'"), repr("\"'"))
63 s = "\""*30+"'"*100
64 expected = repr(s)[:13] + "..." + repr(s)[-14:]
65 eq(r(s), expected)
66
67 def test_tuple(self):
68 eq = self.assertEqual

Callers

nothing calls this directly

Calls 2

eqFunction · 0.85
rFunction · 0.50

Tested by

no test coverage detected