MCPcopy Create free account
hub / github.com/EasyIME/PIME / test_default

Method test_default

python/python3/tornado/test/util_test.py:111–123  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

109 self.assertEqual(obj2.b, 2)
110
111 def test_default(self):
112 # In these tests we combine a typing.cast to satisfy mypy with
113 # a runtime type-assertion. Without the cast, mypy would only
114 # let us access attributes of the base class.
115 obj = cast(TestConfig1, TestConfigurable())
116 self.assertIsInstance(obj, TestConfig1)
117 self.assertIs(obj.a, None)
118
119 obj = cast(TestConfig1, TestConfigurable(a=1))
120 self.assertIsInstance(obj, TestConfig1)
121 self.assertEqual(obj.a, 1)
122
123 self.checkSubclasses()
124
125 def test_config_class(self):
126 TestConfigurable.configure(TestConfig2)

Callers

nothing calls this directly

Calls 2

checkSubclassesMethod · 0.95
TestConfigurableClass · 0.85

Tested by

no test coverage detected