Skip to content

Commit

Permalink
Amend tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyklay committed Jun 13, 2022
1 parent e1fa7cc commit 2b20180
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,16 @@ def test_int_list(self):
assert_type_and_value(list, [42, 33], self.env('INT_LIST', cast=[int]))
assert_type_and_value(list, [42, 33], self.env.list('INT_LIST', int))

def test_int_tuple(self):
def test_int_list_cast_tuple(self):
assert_type_and_value(tuple, (42, 33), self.env('INT_LIST', cast=(int,)))
assert_type_and_value(tuple, (42, 33), self.env.tuple('INT_LIST', int))
assert_type_and_value(tuple, ('42', '33'), self.env.tuple('INT_LIST'))

def test_int_tuple(self):
assert_type_and_value(tuple, (42, 33), self.env('INT_TUPLE', cast=(int,)))
assert_type_and_value(tuple, (42, 33), self.env.tuple('INT_TUPLE', int))
assert_type_and_value(tuple, ('42', '33'), self.env.tuple('INT_TUPLE'))

def test_str_list_with_spaces(self):
assert_type_and_value(list, [' foo', ' bar'],
self.env('STR_LIST_WITH_SPACES', cast=[str]))
Expand Down

0 comments on commit 2b20180

Please sign in to comment.