Beispiel #1
0
 def test_wrong_kitchen_sink(self):
     o = object()
     c = C()
     tf = TupleFilter(('a', 1, o, c))
     assert not tf(('a', 2, o, c))
Beispiel #2
0
 def test_wrong_numbers(self):
     tf = TupleFilter((1, 2, 3))
     assert not tf((1, 2, 4))
Beispiel #3
0
 def test_wrong_single_value(self):
     tf = TupleFilter(('s', ))
     assert not tf(('x', ))
Beispiel #4
0
 def test_wrong_type(self):
     tf = TupleFilter((1, str))
     assert not tf((1, 2))
Beispiel #5
0
 def test_wrong_length(self):
     tf = TupleFilter((1, 2, 3))
     assert not tf((1, 2))
Beispiel #6
0
 def test_equal_kitchen_sink(self):
     o = object()
     c = C()
     tf = TupleFilter(('a', 1, o, c))
     assert tf(('a', 1, o, c))
Beispiel #7
0
 def test_equal_single(self):
     tf = TupleFilter(('s', ))
     assert tf(('s', ))
Beispiel #8
0
 def test_equal_numbers(self):
     tf = TupleFilter((1, 2, 3))
     assert tf((1, 2, 3))