(self)
| 10878 | self.assertIn('SupportsComplex', a) |
| 10879 | |
| 10880 | def test_all_exported_names(self): |
| 10881 | # ensure all dynamically created objects are actualised |
| 10882 | for name in typing.__all__: |
| 10883 | getattr(typing, name) |
| 10884 | |
| 10885 | actual_all = set(typing.__all__) |
| 10886 | computed_all = { |
| 10887 | k for k, v in vars(typing).items() |
| 10888 | # explicitly exported, not a thing with __module__ |
| 10889 | if k in actual_all or ( |
| 10890 | # avoid private names |
| 10891 | not k.startswith('_') and |
| 10892 | # there's a few types and metaclasses that aren't exported |
| 10893 | not k.endswith(('Meta', '_contra', '_co')) and |
| 10894 | not k.upper() == k and |
| 10895 | # but export all things that have __module__ == 'typing' |
| 10896 | getattr(v, '__module__', None) == typing.__name__ |
| 10897 | ) |
| 10898 | } |
| 10899 | self.assertSetEqual(computed_all, actual_all) |
| 10900 | |
| 10901 | |
| 10902 | class TypeIterationTests(BaseTestCase): |
nothing calls this directly
no test coverage detected