コード例 #1
0
 def test_hex_to_binary_failure(self):
     """
     unit test to test the conversion of a hexadecimal value to binary
     for a valid hexadecimal value to fetch the the corresponding
     invalid binary value
     """
     val = "e0"
     binaryval = "10000000"
     out = _hex_to_binary(val)
     self.assertNotEqual(binaryval, out)
コード例 #2
0
 def test_hex_to_binary_failure(self):
     """
     unit test to test the conversion of a hexadecimal value to binary
     for a valid hexadecimal value to fetch the the corresponding
     invalid binary value
     """
     val = 'e0'
     binaryval = '10000000'
     out = _hex_to_binary(val)
     self.assertNotEqual(binaryval, out)
コード例 #3
0
 def test_hex_to_binary_success(self):
     """
     unit test to test the conversion of a hexadecimal value to binary
     for a valid hexadecimal value to fetch the the corresponding binary
     value
     """
     val = "80"
     binaryval = "10000000"
     out = _hex_to_binary(val)
     self.assertEqual(binaryval, out)
コード例 #4
0
 def test_hex_to_binary_success(self):
     """
     unit test to test the conversion of a hexadecimal value to binary
     for a valid hexadecimal value to fetch the the corresponding binary
     value
     """
     val = '80'
     binaryval = '10000000'
     out = _hex_to_binary(val)
     self.assertEqual(binaryval, out)