test_plates:
from plates import is_valid
def test_correct():
assert (is_valid("ASD123")) == True
assert (is_valid("ASD")) == True
assert (is_valid("AS2")) == True
assert (is_valid("AS")) == True
assert (is_valid("ASasas")) == True
def test_incorrect_start():
assert (is_valid("A'shelpa")) == False
assert (is_valid("'2Ashelpa")) == False
def test_incorrect_number_placement():
assert (is_valid("2Ahelpa")) == False
assert (is_valid("A2helpa")) == False
assert (is_valid("A2help2a")) == False
def test_incorrect_zero():
assert (is_valid("Ahelpa02")) == False
assert (is_valid("Ahelpa0")) == False
def test_incorrect_pattern():
assert (is_valid("kel,l12")) == False
assert (is_valid("kel l12")) == False
assert (is_valid("kel.l12")) == False
assert (is_valid("kel-l12")) == False
assert (is_valid("kel;l12")) == False
assert (is_valid("kel:l12")) == False
assert (is_valid("02")) == False
def test_incorrect_length_small():
assert (is_valid("A")) == False
def test_incorrect_length_big():
assert (is_valid("Afgjrjnsvkngltnjsngjt")) == False
Pytest on my local system works properly for the cases
I am getting below errors:
:( test_plates catches plates.py without beginning alphabetical checks
:( test_plates catches plates.py without checks for number placement
:( test_plates catches plates.py without checks for zero placement
:( test_plates catches plates.py without checks for alphanumeric characters