示例#1
0
 def test_b62(self):
     base = 36
     x = 1022
     to = int2base(x, base)
     back = base2int(to, base)
     assert x == back
示例#2
0
 def test_2b36_1(self):
     x = 37
     expected = '11'
     result = int2base(x, 36)
     assert expected == result
示例#3
0
 def test_2b62_1(self):
     x = 63
     expected = '11'
     result = int2base(x, 62)
     assert expected == result
示例#4
0
 def test_2b16_1(self):
     x = 17
     expected = '11'
     result = int2base(x, 16)
     assert expected == result
示例#5
0
 def test_b62(self):
     base = 36
     x = 1022
     to = int2base(x, base)
     back = base2int(to, base)
     assert x == back
示例#6
0
 def test_2b62_1(self):
     x = 63
     expected = '11'
     result = int2base(x, 62)
     assert expected == result
示例#7
0
 def test_2b36_1(self):
     x = 37
     expected = '11'
     result = int2base(x, 36)
     assert expected == result
示例#8
0
 def test_2b16_1(self):
     x = 17
     expected = '11'
     result = int2base(x, 16)
     assert expected == result