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

Method test_tuple

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

Source from the content-addressed store, hash-verified

65 eq(r(s), expected)
66
67 def test_tuple(self):
68 eq = self.assertEqual
69 eq(r((1,)), "(1,)")
70
71 t3 = (1, 2, 3)
72 eq(r(t3), "(1, 2, 3)")
73
74 r2 = Repr()
75 r2.maxtuple = 2
76 expected = repr(t3)[:-2] + "...)"
77 eq(r2.repr(t3), expected)
78
79 # modified fillvalue:
80 r3 = Repr()
81 r3.fillvalue = '+++'
82 r3.maxtuple = 2
83 expected = repr(t3)[:-2] + "+++)"
84 eq(r3.repr(t3), expected)
85
86 def test_container(self):
87 from array import array

Callers

nothing calls this directly

Calls 4

reprMethod · 0.95
ReprClass · 0.90
eqFunction · 0.85
rFunction · 0.50

Tested by

no test coverage detected