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