(self)
| 11074 | self.assertIn('SupportsComplex', a) |
| 11075 | |
| 11076 | def test_all_exported_names(self): |
| 11077 | # ensure all dynamically created objects are actualised |
| 11078 | for name in typing.__all__: |
| 11079 | getattr(typing, name) |
| 11080 | |
| 11081 | actual_all = set(typing.__all__) |
| 11082 | computed_all = { |
| 11083 | k for k, v in vars(typing).items() |
| 11084 | # explicitly exported, not a thing with __module__ |
| 11085 | if k in actual_all or ( |
| 11086 | # avoid private names |
| 11087 | not k.startswith('_') and |
| 11088 | # there's a few types and metaclasses that aren't exported |
| 11089 | not k.endswith(('Meta', '_contra', '_co')) and |
| 11090 | not k.upper() == k and |
| 11091 | k not in {"ByteString"} and |
| 11092 | # but export all other things that have __module__ == 'typing' |
| 11093 | getattr(v, '__module__', None) == typing.__name__ |
| 11094 | ) |
| 11095 | } |
| 11096 | self.assertSetEqual(computed_all, actual_all) |
| 11097 | |
| 11098 | |
| 11099 | class TypeIterationTests(BaseTestCase): |
nothing calls this directly
no test coverage detected