Exemplo n.º 1
0
    def _do_check(self, seq):
        min_ = self.min
        max_ = self.max
        length = uppercase_length(get_str_seq(seq)) if self.ignore_masked else get_length(seq)

        passed = True
        if min_ is not None and length < min_:
            passed = False
        if max_ is not None and length > max_:
            passed = False
        return passed
Exemplo n.º 2
0
    def _do_check(self, seq):
        min_ = self.min
        max_ = self.max
        length = uppercase_length(
            get_str_seq(seq)) if self.ignore_masked else get_length(seq)

        passed = True
        if min_ is not None and length < min_:
            passed = False
        if max_ is not None and length > max_:
            passed = False
        return passed
Exemplo n.º 3
0
 def test_uppercase_length(self):
     "It counts the number of uppercase letters in a string"
     assert uppercase_length("aCTaGGt") == 4
     assert uppercase_length("acagt") == 0
Exemplo n.º 4
0
 def test_uppercase_length(self):
     'It counts the number of uppercase letters in a string'
     assert uppercase_length('aCTaGGt') == 4
     assert uppercase_length('acagt') == 0