(self)
| 9660 | Union[int, Annotated[int, {}]]) |
| 9661 | |
| 9662 | def test_order_in_union(self): |
| 9663 | expr1 = Annotated[int, 1] | str | Annotated[str, {}] | int |
| 9664 | for args in itertools.permutations(get_args(expr1)): |
| 9665 | with self.subTest(args=args): |
| 9666 | self.assertEqual(expr1, reduce(operator.or_, args)) |
| 9667 | |
| 9668 | expr2 = Union[Annotated[int, 1], str, Annotated[str, {}], int] |
| 9669 | for args in itertools.permutations(get_args(expr2)): |
| 9670 | with self.subTest(args=args): |
| 9671 | self.assertEqual(expr2, Union[args]) |
| 9672 | |
| 9673 | def test_specialize(self): |
| 9674 | L = Annotated[List[T], "my decoration"] |
nothing calls this directly
no test coverage detected