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

Method test_cyclical_repr

Lib/test/test_set.py:323–331  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

321 self.assertRaises(RuntimeError, s.remove, BadCmp())
322
323 def test_cyclical_repr(self):
324 w = ReprWrapper()
325 s = self.thetype([w])
326 w.value = s
327 if self.thetype == set:
328 self.assertEqual(repr(s), '{set(...)}')
329 else:
330 name = repr(s).partition('(')[0] # strip class name
331 self.assertEqual(repr(s), '%s({%s(...)})' % (name, name))
332
333 @unittest.expectedFailure # TODO: RUSTPYTHON
334 def test_do_not_rehash_dict_keys(self):

Callers

nothing calls this directly

Calls 4

ReprWrapperClass · 0.85
reprFunction · 0.85
assertEqualMethod · 0.45
partitionMethod · 0.45

Tested by

no test coverage detected