def test_parse_int_list(self): eq_(parse_arg({'foo': '1,'}, 'foo', int, ','), [1]) eq_(parse_arg({'foo': '1,2'}, 'foo', int, ','), [1,2])
def test_parse_int(self): eq_(parse_arg({'foo': '1'}, 'foo', int), 1) eq_(parse_arg({'foo': '1'}, 'foo', int, ','), 1)
def test_parse_float(self): eq_(parse_arg({'foo': '123.4'}, 'foo', float), 123.4)
def test_parse_invalid(self): parse_arg({'foo': 'a'}, 'foo', int)
def test_parse_int_list(self): eq_(parse_arg({'foo': '1,'}, 'foo', int, ','), [1]) eq_(parse_arg({'foo': '1,2'}, 'foo', int, ','), [1, 2])