MCPcopy Index your code
hub / github.com/numpy/numpy / test_asserts

Method test_asserts

numpy/testing/tests/test_utils.py:2093–2105  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2091 assert_no_gc_cycles(no_cycle)
2092
2093 def test_asserts(self):
2094 def make_cycle():
2095 a = []
2096 a.append(a)
2097 a.append(a)
2098 return a
2099
2100 with assert_raises(AssertionError):
2101 with assert_no_gc_cycles():
2102 make_cycle()
2103
2104 with assert_raises(AssertionError):
2105 assert_no_gc_cycles(make_cycle)
2106
2107 def test_fails(self):
2108 """

Callers

nothing calls this directly

Calls 2

assert_raisesFunction · 0.90
assert_no_gc_cyclesFunction · 0.90

Tested by

no test coverage detected