MCPcopy
hub / github.com/tornadoweb/tornado / checkSubclasses

Method checkSubclasses

tornado/test/util_test.py:95–104  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

93 TestConfig3._restore_configuration(self.saved3)
94
95 def checkSubclasses(self):
96 # no matter how the class is configured, it should always be
97 # possible to instantiate the subclasses directly
98 self.assertIsInstance(TestConfig1(), TestConfig1)
99 self.assertIsInstance(TestConfig2(), TestConfig2)
100
101 obj = TestConfig1(a=1)
102 self.assertEqual(obj.a, 1)
103 obj2 = TestConfig2(b=2)
104 self.assertEqual(obj2.b, 2)
105
106 def test_default(self):
107 # In these tests we combine a typing.cast to satisfy mypy with

Callers 5

test_defaultMethod · 0.95
test_config_classMethod · 0.95
test_config_strMethod · 0.95
test_config_argsMethod · 0.95

Calls 2

TestConfig1Class · 0.85
TestConfig2Class · 0.85

Tested by

no test coverage detected