(self, future_annotations)
| 28 | class TestGetClassAnnotations: |
| 29 | @pytest.mark.parametrize("future_annotations", [False, True]) |
| 30 | def test_eval_scopes(self, future_annotations): |
| 31 | header = "from __future__ import annotations" if future_annotations else "" |
| 32 | source = f""" |
| 33 | {header} |
| 34 | STR = str |
| 35 | |
| 36 | class Ex: |
| 37 | LOCAL = float |
| 38 | x: int |
| 39 | y: LOCAL |
| 40 | z: STR |
| 41 | """ |
| 42 | with temp_module(source) as mod: |
| 43 | assert get_class_annotations(mod.Ex) == {"x": int, "y": float, "z": str} |
| 44 | |
| 45 | def test_none_to_nonetype(self): |
| 46 | class Ex: |
nothing calls this directly
no test coverage detected