MCPcopy Create free account
hub / github.com/numpy/numpy / test_asserts

Method test_asserts

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

Source from the content-addressed store, hash-verified

1569 assert_no_gc_cycles(no_cycle)
1570
1571 def test_asserts(self):
1572 def make_cycle():
1573 a = []
1574 a.append(a)
1575 a.append(a)
1576 return a
1577
1578 with assert_raises(AssertionError):
1579 with assert_no_gc_cycles():
1580 make_cycle()
1581
1582 with assert_raises(AssertionError):
1583 assert_no_gc_cycles(make_cycle)
1584
1585 @pytest.mark.slow
1586 def test_fails(self):

Callers

nothing calls this directly

Calls 2

assert_raisesFunction · 0.90
assert_no_gc_cyclesFunction · 0.90

Tested by

no test coverage detected