MCPcopy Index your code
hub / github.com/python/cpython / Test

Class Test

Lib/test/test_unittest/test_case.py:31–55  ·  view source on GitHub ↗

Keep these TestCase classes out of the main namespace

Source from the content-addressed store, hash-verified

29
30
31class 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
58class List(list):

Calls

no outgoing calls

Tested by 3

Used in the wild real call sites across dependent graphs

searching dependent graphs…