Exemplo n.º 1
0
 def testCodeAndMessage(self):
     status = pywrap_tensorflow.Status(error_codes_pb2.INVALID_ARGUMENT,
                                       'foo')
     self.assertEqual(error_codes_pb2.INVALID_ARGUMENT, status.code())
     self.assertEqual('foo', status.error_message())
Exemplo n.º 2
0
 def testToString(self):
     status = pywrap_tensorflow.Status()
     # .ToString was remapped in the .swig file, hence will not work
     # self.assertIn('OK', status.ToString())
     self.assertIn('OK', str(status))
Exemplo n.º 3
0
 def testDefaultOk(self):
     status = pywrap_tensorflow.Status()
     self.assertTrue(status.ok())