예제 #1
0
 def test_list_n_or_more_invalid_data(self):
     self.expect_raises(valid.list_n_or_more(valid.int, 1), ['a',2], errors={0: ["invalid literal for int() with base 10: 'a'"]})
예제 #2
0
 def test_list_n_or_more_more(self):
     self.expect(valid.list_n_or_more(valid.int, 1), [1,2])
예제 #3
0
 def test_list_n_or_more_zero(self):
     self.expect_raises(valid.list_n_or_more(valid.int, 1), [], errors={'__nonindexerrors__': ['Expected list with 1 or more elements, saw 0']})
예제 #4
0
 def test_list_n_or_more_invalid_data(self):
     self.expect_raises(valid.list_n_or_more(valid.int, 1), ['a',2], errors={0: ["invalid literal for int() with base 10: 'a'"]})
예제 #5
0
 def test_list_n_or_more_more(self):
     self.expect(valid.list_n_or_more(valid.int, 1), [1,2])
예제 #6
0
 def test_list_n_or_more_zero(self):
     self.expect_raises(valid.list_n_or_more(valid.int, 1), [], errors={'__nonindexerrors__': ['Expected list with 1 or more elements, saw 0']})