(self)
| 9536 | Union[int, Annotated[int, {}]]) |
| 9537 | |
| 9538 | def test_order_in_union(self): |
| 9539 | expr1 = Annotated[int, 1] | str | Annotated[str, {}] | int |
| 9540 | for args in itertools.permutations(get_args(expr1)): |
| 9541 | with self.subTest(args=args): |
| 9542 | self.assertEqual(expr1, reduce(operator.or_, args)) |
| 9543 | |
| 9544 | expr2 = Union[Annotated[int, 1], str, Annotated[str, {}], int] |
| 9545 | for args in itertools.permutations(get_args(expr2)): |
| 9546 | with self.subTest(args=args): |
| 9547 | self.assertEqual(expr2, Union[args]) |
| 9548 | |
| 9549 | def test_specialize(self): |
| 9550 | L = Annotated[List[T], "my decoration"] |
nothing calls this directly
no test coverage detected