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

Method check_invariant

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

Source from the content-addressed store, hash-verified

1799 self.assertReturnsIfImplemented(value, func)
1800
1801 def check_invariant(self, cond):
1802 # this is only supposed to succeed when there are no sleepers
1803 if self.TYPE == 'processes':
1804 try:
1805 sleepers = (cond._sleeping_count.get_value() -
1806 cond._woken_count.get_value())
1807 self.assertEqual(sleepers, 0)
1808 self.assertEqual(cond._wait_semaphore.get_value(), 0)
1809 except NotImplementedError:
1810 pass
1811
1812 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
1813 def test_notify(self):

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