(self)
| 858 | self.assertEqual(type_params[0].__bound__, str) |
| 859 | |
| 860 | def test_annotations(self): |
| 861 | class My: |
| 862 | @recursive_repr() |
| 863 | def __repr__(self, default: undefined = ...): |
| 864 | return default |
| 865 | |
| 866 | annotations = annotationlib.get_annotations( |
| 867 | My.__repr__, format=annotationlib.Format.FORWARDREF |
| 868 | ) |
| 869 | self.assertEqual( |
| 870 | annotations, |
| 871 | {'default': EqualToForwardRef("undefined", owner=My.__repr__)} |
| 872 | ) |
| 873 | |
| 874 | if __name__ == "__main__": |
| 875 | unittest.main() |
nothing calls this directly
no test coverage detected