From eef2dcf03265cd49fc8c582ce8e6695d461733cd Mon Sep 17 00:00:00 2001 From: Edvard Rejthar Date: Wed, 25 Sep 2024 21:51:18 +0200 Subject: [PATCH] WIP12 --- tests/tests.py | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/tests/tests.py b/tests/tests.py index 0cfd64d..4993ed1 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -503,24 +503,7 @@ def test_annotated(self): self.assertTrue(d[""]["test2"].update(" ")) -class TestAnnotation(TestAbstract): - """ Tests tag annotation. """ - -# TODO - # def test_type_discovery(self): - # def _(compared, annotation): - # self.assertListEqual(compared, Tag(annotation=annotation)._get_possible_types()) - - # _([], None) - # _([(None, str)], str) - # _([(None, str)], None | str) - # _([(None, str)], str | None) - # _([(list, str)], list[str]) - # _([(list, str)], list[str] | None) - # _([(list, str)], None | list[str]) - # _([(list, str), (tuple, int)], None | list[str] | tuple[int]) - # _([(list, int), (tuple, str), (None, str)], list[int] | tuple[str] | str | None) - +class TestParametrizedGeneric(TestAbstract): def test_generic(self): t = Tag("", annotation=list) t.update("") @@ -569,5 +552,7 @@ def test_choice(self): self.assertEqual(2, m.choice([Tag(1, name="one"), Tag(2, name="two")], default=2)) + + if __name__ == '__main__': main()