Home | History | Annotate | Download | only in test

Lines Matching defs:Test

47     # test for it.
63 # Make sure loadTestsFromTestCase() picks up the default test method
72 # This has to be false for the test to succeed
89 def test(self):
97 expected = [loader.suiteClass([MyTestCase('test')])]
135 # XXX Certain people are using this behaviour. We'll add a test for it
138 def test(self):
147 reference = [unittest.TestSuite([MyTestCase('test')])]
156 def test(self):
187 test = list(suite)[0]
189 self.assertRaisesRegexp(TypeError, "some failure", test.m)
198 # a module, a test case class, a TestSuite instance, a test method
199 # within a test case class, or a callable object which returns a
214 # a module, a test case class, a TestSuite instance, a test method
215 # within a test case class, or a callable object which returns a
247 # a module, a test case class, a TestSuite instance, a test method
248 # within a test case class, or a callable object which returns a
263 # a module, a test case class, a TestSuite instance, a test method
264 # within a test case class, or a callable object which returns a
280 # a module, a test case class, a TestSuite instance, a test method
281 # within a test case class, or a callable object which returns a
301 # a module, a test case class, a TestSuite instance, a test method
302 # within a test case class, or a callable object which returns a
333 def test(self):
342 reference = [MyTestCase('test')]
346 # a module, a test case class, a TestSuite instance, a test method
347 # within a test case class, or a callable object which returns a
365 # resolve either to ... a test case class"
369 def test(self):
376 self.assertEqual(list(suite), [MyTestCase('test')])
379 # a module, a test case class, a TestSuite instance, a test method
380 # within a test case class, or a callable object which returns a
385 def test(self):
387 m.testsuite = unittest.TestSuite([MyTestCase('test')])
393 self.assertEqual(list(suite), [MyTestCase('test')])
396 # ... a test method within a test case class"
400 def test(self):
405 suite = loader.loadTestsFromName('testcase_1.test', m)
408 self.assertEqual(list(suite), [MyTestCase('test')])
411 # a module, a test case class, a TestSuite instance, a test method
412 # within a test case class, or a callable object which returns a
416 # resolve "a test method within a test case class" that doesn't exist
421 def test(self):
483 # ... a test method within a test case class"
492 def test(self):
498 suite = loader.loadTestsFromName('testcase_1.test', m)
501 self.assertEqual(list(suite), [MyTestCase('test')])
527 module_name = 'unittest.test.dummy'
576 # a module, a test case class, a TestSuite instance, a test method
577 # within a test case class, or a callable object which returns a
592 # a module, a test case class, a TestSuite instance, a test method
593 # within a test case class, or a callable object which returns a
611 # a module, a test case class, a TestSuite instance, a test method
612 # within a test case class, or a callable object which returns a
627 # a module, a test case class, a TestSuite instance, a test method
628 # within a test case class, or a callable object which returns a
643 # a module, a test case class, a TestSuite instance, a test method
644 # within a test case class, or a callable object which returns a
662 # a module, a test case class, a TestSuite instance, a test method
663 # within a test case class, or a callable object which returns a
681 # a module, a test case class, a TestSuite instance, a test method
682 # within a test case class, or a callable object which returns a
702 # a module, a test case class, a TestSuite instance, a test method
703 # within a test case class, or a callable object which returns a
731 def test(self):
740 reference = [unittest.TestSuite([MyTestCase('test')])]
744 # a module, a test case class, a TestSuite instance, a test method
745 # within a test case class, or a callable object which returns a
763 # ... a test case class"
767 def test(self):
775 expected = loader.suiteClass([MyTestCase('test')])
783 def test(self):
785 m.testsuite = unittest.TestSuite([MyTestCase('test')])
794 # test method within a test case class"
798 def test(self):
803 suite = loader.loadTestsFromNames(['testcase_1.test'], m)
806 ref_suite = unittest.TestSuite([MyTestCase('test')])
810 # test method within a test case class"
813 # resolve to "a test method within a test case class" but don't?
817 def test(self):
869 def test(self):
872 testcase_1 = Test1('test')
910 module_name = 'unittest.test.dummy'
934 # Test.foobar is defined to make sure getTestCaseNames() respects
937 class Test(unittest.TestCase):
944 self.assertEqual(loader.getTestCaseNames(Test), ['test_1', 'test_2'])
950 class Test(unittest.TestCase):
955 self.assertEqual(loader.getTestCaseNames(Test), [])
1003 # test methods"
1020 loader.testMethodPrefix = 'test'
1024 # test methods"
1043 loader.testMethodPrefix = 'test'
1047 # test methods"
1066 loader.testMethodPrefix = 'test'
1070 # test methods"
1090 loader.testMethodPrefix = 'test'
1093 # "The default value is 'test'"
1096 self.assertTrue(loader.testMethodPrefix == 'test')
1218 # "Callable object that constructs a test suite from a list of tests."