Lines Matching refs:unittest

10 import unittest
13 @unittest.skipUnless(hasattr(os, 'kill'), "Test requires os.kill")
14 @unittest.skipIf(sys.platform =="win32", "Test cannot run on Windows")
15 @unittest.skipIf(sys.platform == 'freebsd6', "Test kills regrtest on freebsd6 "
17 class TestBreak(unittest.TestCase):
27 unittest.signals._results = weakref.WeakKeyDictionary()
28 unittest.signals._interrupt_handler = None
33 unittest.installHandler()
42 self.assertTrue(unittest.signals._interrupt_handler.called)
45 result = unittest.TestResult()
46 unittest.registerResult(result)
48 for ref in unittest.signals._results:
60 result = unittest.TestResult()
61 unittest.installHandler()
62 unittest.registerResult(result)
84 result = unittest.TestResult()
85 unittest.installHandler()
86 unittest.registerResult(result)
106 unittest.installHandler()
108 result = unittest.TestResult()
109 unittest.registerResult(result)
112 result2 = unittest.TestResult()
113 unittest.registerResult(result2)
116 result3 = unittest.TestResult()
140 unittest.installHandler()
158 runner = unittest.TextTestRunner(stream=StringIO())
160 result = runner.run(unittest.TestSuite())
161 self.assertIn(result, unittest.signals._results)
165 result = unittest.TestResult()
166 unittest.registerResult(result)
177 result = unittest.TestResult()
178 unittest.registerResult(result)
180 unittest.installHandler()
181 self.assertTrue(unittest.removeResult(result))
184 self.assertFalse(unittest.removeResult(unittest.TestResult()))
210 class Program(unittest.TestProgram):
246 unittest.installHandler()
247 unittest.removeHandler()
251 unittest.removeHandler()
256 unittest.installHandler()
258 @unittest.removeHandler
265 @unittest.skipUnless(hasattr(os, 'kill'), "Test requires os.kill")
266 @unittest.skipIf(sys.platform =="win32", "Test cannot run on Windows")
267 @unittest.skipIf(sys.platform == 'freebsd6', "Test kills regrtest on freebsd6 "
272 @unittest.skipUnless(hasattr(os, 'kill'), "Test requires os.kill")
273 @unittest.skipIf(sys.platform =="win32", "Test cannot run on Windows")
274 @unittest.skipIf(sys.platform == 'freebsd6', "Test kills regrtest on freebsd6 "
279 @unittest.skipUnless(hasattr(os, 'kill'), "Test requires os.kill")
280 @unittest.skipIf(sys.platform =="win32", "Test cannot run on Windows")
281 @unittest.skipIf(sys.platform == 'freebsd6', "Test kills regrtest on freebsd6 "