Skip to content

Commit

Permalink
WIP10
Browse files Browse the repository at this point in the history
  • Loading branch information
e3rd committed Sep 25, 2024
1 parent e77c1f8 commit 780c1f2
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,33 +538,13 @@ def test_parametrized_generic(self):
t.update("[1,'2',3]")
self.assertEqual(["1", "2", "3"], t.val)

# TODO
# def test_single_path_union(self):
# t = Tag("", annotation=Path | None)
# t.update("/tmp/")
# self.assertEqual(Path("/tmp"), t.val)
# t.update("")
# self.assertIsNone(t.val)

def test_path(self):
t = Tag("", annotation=list[Path])
t.update("['/tmp/','/usr']")
self.assertEqual([Path("/tmp"), Path("/usr")], t.val)
self.assertFalse(t.update("[1,2,3]"))
self.assertFalse(t.update("[/home, /usr]")) # missing parenthesis

# TODO
# def test_path_union(self):
# t = Tag("", annotation=list[Path]|None)
# t.update("['/tmp/','/usr']")
# self.assertEqual([Path("/tmp"), Path("/usr")], t.val)
# self.assertFalse(t.update("[1,2,3]"))
# self.assertFalse(t.update("[/home, /usr]")) # missing parenthesis
# self.assertTrue(t.update("[]"))
# self.assertEqual([],t.val)
# self.assertTrue(t.update(""))
# self.assertIsNone(t.val)

def test_path_cli(self):
m = run(ParametrizedGeneric, interface=Mininterface)
f = dataclass_to_tagdict(m.env, m._descriptions)[""]["paths"]
Expand Down

0 comments on commit 780c1f2

Please sign in to comment.