Exemple #1
0
 def test_invalid_char_b32(self):
     base2int('123a', 32)
Exemple #2
0
 def test_invalid_char_b62(self):
     base2int('123!', 62)
Exemple #3
0
 def test_b62(self):
     base = 36
     x = 1022
     to = int2base(x, base)
     back = base2int(to, base)
     assert x == back
Exemple #4
0
 def test_invalid_char_b16(self):
     base2int('123Z', 16)
Exemple #5
0
 def test_invalid_char_b32(self):
     with pytest.raises(ValueError):
         base2int('123a', 32)
Exemple #6
0
 def test_invalid_char_b62(self):
     with pytest.raises(ValueError):
         base2int('123!', 62)
Exemple #7
0
 def test_invalid_char_b16(self):
     with pytest.raises(ValueError):
         base2int('123Z', 16)
Exemple #8
0
 def test_b62(self):
     base = 36
     x = 1022
     to = int2base(x, base)
     back = base2int(to, base)
     assert x == back
 def test_invalid_char_b62(self):
     with pytest.raises(ValueError):
         base2int('123!', 62)
Exemple #10
0
 def test_invalid_char_b32(self):
     with pytest.raises(ValueError):
         base2int('123a', 32)
Exemple #11
0
 def test_invalid_char_b16(self):
     with pytest.raises(ValueError):
         base2int('123Z', 16)