Lines Matching refs:unittest
8 import unittest
11 @unittest.skipUnless(hasattr(os, 'kill'), "Test requires os.kill")
12 @unittest.skipIf(sys.platform =="win32", "Test cannot run on Windows")
13 class TestBreak(unittest.TestCase):
23 unittest.signals._results = weakref.WeakKeyDictionary()
24 unittest.signals._interrupt_handler = None
29 unittest.installHandler()
38 self.assertTrue(unittest.signals._interrupt_handler.called)
41 result = unittest.TestResult()
42 self.assertNotIn(result, unittest.signals._results)
44 unittest.registerResult(result)
46 self.assertIn(result, unittest.signals._results)
48 unittest.removeResult(result)
53 result = unittest.TestResult()
54 unittest.installHandler()
55 unittest.registerResult(result)
77 result = unittest.TestResult()
78 unittest.installHandler()
79 unittest.registerResult(result)
99 unittest.installHandler()
101 result = unittest.TestResult()
102 unittest.registerResult(result)
105 result2 = unittest.TestResult()
106 unittest.registerResult(result2)
109 result3 = unittest.TestResult()
133 unittest.installHandler()
151 runner = unittest.TextTestRunner(stream=io.StringIO())
153 result = runner.run(unittest.TestSuite())
154 self.assertIn(result, unittest.signals._results)
158 result = unittest.TestResult()
159 unittest.registerResult(result)
170 result = unittest.TestResult()
171 unittest.registerResult(result)
173 unittest.installHandler()
174 self.assertTrue(unittest.removeResult(result))
177 self.assertFalse(unittest.removeResult(unittest.TestResult()))
203 class Program(unittest.TestProgram):
244 unittest.installHandler()
245 unittest.removeHandler()
249 unittest.removeHandler()
254 unittest.installHandler()
256 @unittest.removeHandler
263 @unittest.skipUnless(hasattr(os, 'kill'), "Test requires os.kill")
264 @unittest.skipIf(sys.platform =="win32", "Test cannot run on Windows")
268 @unittest.skipUnless(hasattr(os, 'kill'), "Test requires os.kill")
269 @unittest.skipIf(sys.platform =="win32", "Test cannot run on Windows")
273 @unittest.skipUnless(hasattr(os, 'kill'), "Test requires os.kill")
274 @unittest.skipIf(sys.platform =="win32", "Test cannot run on Windows")
280 unittest.main()