Example #1
0
 def _check_int_seq(self,obj,mx_int):
     if common.is_sequence(obj):
         for o in obj:
             if self._check_int_seq(o,mx_int):
                 return 1
     elif not common.is_int(obj) or obj>=mx_int:
         return 1
     return 0
Example #2
0
 def _check_int_seq(self,obj,mx_int):
     if common.is_sequence(obj):
         for o in obj:
             if self._check_int_seq(o,mx_int):
                 return 1
     elif not common.is_int(obj) or obj>=mx_int:
         return 1
     return 0
Example #3
0
def test_is_sequence():
    test_list = ['foo', None, 'baz', 'qux', '']
    empty_str = ''
    assert is_sequence(test_list) is True
    assert is_sequence(empty_str) is False
    pass