MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / test_nested

Method test_nested

tests_python/test_safe_repr.py:298–315  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

296 self.assert_shortened(c3, expected3)
297
298 def test_nested(self):
299 ctype = self.CLASS
300 for i in range(1, len(SafeRepr.maxcollection)):
301 items1 = range(SafeRepr.maxcollection[i] - 1)
302 items2 = range(SafeRepr.maxcollection[i])
303 items3 = range(SafeRepr.maxcollection[i] + 1)
304 c1 = self.CLASS(items1)
305 c2 = self.CLASS(items2)
306 c3 = self.CLASS(items3)
307 for _j in range(i):
308 c1, c2, c3 = ctype((c1,)), ctype((c2,)), ctype((c3,))
309 expected1 = self.combine_nested(i, items1)
310 expected2 = self.combine_nested(i, items2[:-1], large=True)
311 expected3 = self.combine_nested(i, items3[:-2], large=True)
312
313 self.assert_unchanged(c1, expected1)
314 self.assert_shortened(c2, expected2)
315 self.assert_shortened(c3, expected3)
316
317
318class TestTuples(ContainerBase, SafeReprTestBase):

Callers

nothing calls this directly

Calls 3

combine_nestedMethod · 0.95
assert_unchangedMethod · 0.80
assert_shortenedMethod · 0.80

Tested by

no test coverage detected