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

Method test_config_inner_level

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

Source from the content-addressed store, hash-verified

186 self.assertEqual(obj2.b, 2)
187
188 def test_config_inner_level(self):
189 # The inner level can be used even when the outer level
190 # doesn't point to it.
191 obj = TestConfig3()
192 self.assertIsInstance(obj, TestConfig3A)
193
194 TestConfig3.configure(TestConfig3B)
195 obj = TestConfig3()
196 self.assertIsInstance(obj, TestConfig3B)
197
198 # Configuring the base doesn't configure the inner.
199 obj2 = TestConfigurable()
200 self.assertIsInstance(obj2, TestConfig1)
201 TestConfigurable.configure(TestConfig2)
202
203 obj3 = TestConfigurable()
204 self.assertIsInstance(obj3, TestConfig2)
205
206 obj = TestConfig3()
207 self.assertIsInstance(obj, TestConfig3B)
208
209
210class UnicodeLiteralTest(unittest.TestCase):

Callers

nothing calls this directly

Calls 3

TestConfig3Class · 0.85
TestConfigurableClass · 0.85
configureMethod · 0.45

Tested by

no test coverage detected