Home | History | Annotate | Download | only in test

Lines Matching refs:_thread

8 import dummy_thread as _thread

23 self.lock = _thread.allocate_lock()
38 #Make sure release of an unlocked thread raises _thread.error
39 self.assertRaises(_thread.error, self.lock.release)
74 _thread.start_new_thread(delay_unlock,(self.lock, DELAY))
90 #Make sure _thread.exit() raises SystemExit
91 self.assertRaises(SystemExit, _thread.exit)
94 #Test sanity of _thread.get_ident()
95 self.assertIsInstance(_thread.get_ident(), int,
96 "_thread.get_ident() returned a non-integer")
97 self.assertTrue(_thread.get_ident() != 0,
98 "_thread.get_ident() returned 0")
101 #Make sure _thread.LockType is the same type as _thread.allocate_locke()
102 self.assertIsInstance(_thread.allocate_lock(), _thread.LockType,
103 "_thread.LockType is not an instance of what "
104 "is returned by _thread.allocate_lock()")
110 _thread.interrupt_main()
111 self.assertRaises(KeyboardInterrupt, _thread.start_new_thread,
117 self.assertRaises(KeyboardInterrupt, _thread.interrupt_main)
125 """Use to test _thread.start_new_thread() passes args properly."""
129 _thread.start_new_thread(arg_tester, (testing_queue, True, True))
133 _thread.start_new_thread(arg_tester, tuple(), {'queue':testing_queue,
138 _thread.start_new_thread(arg_tester, (testing_queue, True), {'arg2':True})
149 queue.put(_thread.get_ident())
162 _thread.start_new_thread(queue_mark,
172 global _thread, DELAY
174 _thread = imported_module
178 print "*** Using %s as _thread module ***" % _thread