(self)
| 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) |
nothing calls this directly
no test coverage detected