def test_various_examples(self): assert complexity_score('H3LLO_WORLD') == 3 assert complexity_score('nen9aPhu') == 3 assert complexity_score('Ba$th5to') == 4 assert complexity_score('Dre1käse') == 5 assert complexity_score('Oo7,28=r+MU}') == 6
def test_symbols_numbers_end(self): assert complexity_score('password1') == 2 assert complexity_score('password1234') == 2 assert complexity_score('password!') == 2 assert complexity_score('password1!') == 2 assert complexity_score('PaSsWoRd1234!@#%') == 2
def test_foreign_characters(self): assert complexity_score('wasserschloß') == 2 # At the end assert complexity_score('waſſerſchloſs') == 4 assert complexity_score('pass\u0be7word') == 3 assert complexity_score('pass\u0be7\u0be8\u0be9word') == 4
def test_symbols(self): assert complexity_score('pass$#word') == 3 assert complexity_score('q\'w"e%r&t>') == 3 assert complexity_score('pass$word') == 2
def test_spaces(self): assert complexity_score('hello beautiful world') == 3 assert complexity_score('hello world') == 2
def test_mixed_case(self): assert complexity_score('hello') == 1 assert complexity_score('HELLO') == 1 assert complexity_score('hELlO') == 2
def test_numbers(self): assert complexity_score('pass123word') == 3 assert complexity_score('q1w2e3r4t5') == 3 assert complexity_score('pass1word') == 2
def test_lowest_score(self): assert complexity_score('password') == 1 assert complexity_score('qwertyuiop') == 1