Skip to content

Commit

Permalink
Literally one is actually three
Browse files Browse the repository at this point in the history
  • Loading branch information
swansonk14 committed Sep 28, 2024
1 parent fdc0000 commit 1a3af2a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -1247,19 +1247,19 @@ class TupleClassTap(Tap):

self.assertEqual(args.tup, true_args)

def test_tuple_literally_one(self):
def test_tuple_literally_three(self):
class LiterallyOne(Tap):
tup: Tuple[Literal[1]]
tup: Tuple[Literal[3]]

input_args = ("1",)
true_args = (1,)
input_args = ("3",)
true_args = (3,)

args = LiterallyOne().parse_args(["--tup", *input_args])

self.assertEqual(args.tup, true_args)

with self.assertRaises(SystemExit):
LiterallyOne().parse_args(["--tup", "2"])
LiterallyOne().parse_args(["--tup", "5"])

def test_tuple_literally_two(self):
class LiterallyTwo(Tap):
Expand Down

0 comments on commit 1a3af2a

Please sign in to comment.