Keep these TestCase classes out of the main namespace
| 29 | |
| 30 | |
| 31 | class Test(object): |
| 32 | "Keep these TestCase classes out of the main namespace" |
| 33 | |
| 34 | class Foo(unittest.TestCase): |
| 35 | def runTest(self): pass |
| 36 | def test1(self): pass |
| 37 | |
| 38 | class Bar(Foo): |
| 39 | def test2(self): pass |
| 40 | |
| 41 | class LoggingTestCase(unittest.TestCase): |
| 42 | """A test case which logs its calls.""" |
| 43 | |
| 44 | def __init__(self, events): |
| 45 | super(Test.LoggingTestCase, self).__init__('test') |
| 46 | self.events = events |
| 47 | |
| 48 | def setUp(self): |
| 49 | self.events.append('setUp') |
| 50 | |
| 51 | def test(self): |
| 52 | self.events.append('test') |
| 53 | |
| 54 | def tearDown(self): |
| 55 | self.events.append('tearDown') |
| 56 | |
| 57 | |
| 58 | class List(list): |
no outgoing calls
searching dependent graphs…