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

Method test_cycle

Lib/test/test_slice.py:289–296  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

287 self.assertIsNot(s.step, c.step)
288
289 def test_cycle(self):
290 class myobj(): pass
291 o = myobj()
292 o.s = slice(o)
293 w = weakref.ref(o)
294 o = None
295 support.gc_collect()
296 self.assertIsNone(w())
297
298if __name__ == "__main__":
299 unittest.main()

Callers

nothing calls this directly

Calls 4

myobjClass · 0.85
sliceClass · 0.85
assertIsNoneMethod · 0.80
wFunction · 0.50

Tested by

no test coverage detected