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

Method check_invariant

Lib/test/_test_multiprocessing.py:1604–1613  ·  view source on GitHub ↗
(self, cond)

Source from the content-addressed store, hash-verified

1602 self.assertReturnsIfImplemented(value, func)
1603
1604 def check_invariant(self, cond):
1605 # this is only supposed to succeed when there are no sleepers
1606 if self.TYPE == 'processes':
1607 try:
1608 sleepers = (cond._sleeping_count.get_value() -
1609 cond._woken_count.get_value())
1610 self.assertEqual(sleepers, 0)
1611 self.assertEqual(cond._wait_semaphore.get_value(), 0)
1612 except NotImplementedError:
1613 pass
1614
1615 def test_notify(self):
1616 cond = self.Condition()

Callers 3

test_notifyMethod · 0.95
test_notify_allMethod · 0.95
test_notify_nMethod · 0.95

Calls 2

get_valueMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected