Beispiel #1
0
 def test_positive(self):
     from numpypy import base_repr
     assert base_repr(12, 10) == '12'
     assert base_repr(12, 10, 4) == '000012'
     assert base_repr(12, 4) == '30'
     assert base_repr(3731624803700888, 36) == '10QR0ROFCEW'
Beispiel #2
0
 def test_base3(self):
     from numpypy import base_repr
     assert base_repr(3**5, 3) == '100000'
Beispiel #3
0
 def test_negative(self):
     from numpypy import base_repr
     assert base_repr(-12, 10) == '-12'
     assert base_repr(-12, 10, 4) == '-000012'
     assert base_repr(-12, 4) == '-30'
Beispiel #4
0
 def test_positive(self):
     from numpypy import base_repr
     assert base_repr(12, 10) == '12'
     assert base_repr(12, 10, 4) == '000012'
     assert base_repr(12, 4) == '30'
     assert base_repr(3731624803700888, 36) == '10QR0ROFCEW'
Beispiel #5
0
 def test_base3(self):
     from numpypy import base_repr
     assert base_repr(3**5, 3) == '100000'
Beispiel #6
0
 def test_negative(self):
     from numpypy import base_repr
     assert base_repr(-12, 10) == '-12'
     assert base_repr(-12, 10, 4) == '-000012'
     assert base_repr(-12, 4) == '-30'