예제 #1
0
def test_oct2hex_with_places(number, places, expected):
    assert_equivalent(engineering.OCT2HEX(number, places), expected)
예제 #2
0
def test_oct2hex(number, expected):
    assert_equivalent(engineering.OCT2HEX(number), expected)
예제 #3
0
 def test_OCT2HEX_withTooManyPlaces(self):
     self.assertIsInstance(engineering.OCT2HEX(20, 1),
                           xlerrors.NumExcelError)
예제 #4
0
 def test_OCT2HEX_withPlaces(self):
     self.assertEqual(engineering.OCT2HEX(20, 5),
                      func_xltypes.Text('00010'))
     self.assertEqual(engineering.OCT2HEX(4000000000, 1),
                      func_xltypes.Text('FFE0000000'))
예제 #5
0
 def test_OCT2HEX_checkBounds(self):
     self.assertEqual(engineering.OCT2HEX(7777777777),
                      func_xltypes.Text('FFFFFFFFFF'))
     self.assertIsInstance(engineering.OCT2HEX(10000000000),
                           xlerrors.NumExcelError)
예제 #6
0
 def test_OCT2HEX(self):
     self.assertEqual(engineering.OCT2HEX(10), func_xltypes.Text('8'))
     self.assertEqual(engineering.OCT2HEX(12), func_xltypes.Text('A'))