def test_invalid_char_b32(self): base2int('123a', 32)
def test_invalid_char_b62(self): base2int('123!', 62)
def test_b62(self): base = 36 x = 1022 to = int2base(x, base) back = base2int(to, base) assert x == back
def test_invalid_char_b16(self): base2int('123Z', 16)
def test_invalid_char_b32(self): with pytest.raises(ValueError): base2int('123a', 32)
def test_invalid_char_b62(self): with pytest.raises(ValueError): base2int('123!', 62)
def test_invalid_char_b16(self): with pytest.raises(ValueError): base2int('123Z', 16)