Skip to content

Commit

Permalink
WIP12
Browse files Browse the repository at this point in the history
  • Loading branch information
e3rd committed Sep 25, 2024
1 parent 780c1f2 commit eef2dcf
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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("")
Expand Down Expand Up @@ -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()

0 comments on commit eef2dcf

Please sign in to comment.