123456789101112131415161718192021222324252627282930313233343536373839 |
- from plates import is_valid
- def main():
- test_incipit()
- test_length()
- test_digits()
- test_forbidden_characters()
- def test_incipit():
- assert is_valid('11AA11') == False
- assert is_valid('11AA') == False
- assert is_valid('1AA2') == False
- assert is_valid('2AAP') == False
- assert is_valid('A1111') == False
- assert is_valid('AA1111') == True
- def test_length():
- assert is_valid('') == False
- assert is_valid('A') == False
- assert is_valid('AAAAAA111111') == False
- def test_digits():
- assert is_valid('AA111A') == False
- assert is_valid('AA0111') == False
- def test_forbidden_characters():
- assert is_valid('AA1.1') == False
- assert is_valid('AA1,1') == False
- assert is_valid('AA1 1') == False
- assert is_valid('AA11!') == False
- if __name__ == "__main__":
- main()
|