|TensorFlow 1 version||View source on GitHub|
Base class for tests that need to test TensorFlow.
Compat aliases for migration
See Migration guide for more details.
tf.test.TestCase( methodName='runTest' )
addCleanup( *args, **kwargs )
Add a function, with arguments, to be called when the test is completed. Functions added are called on a LIFO basis and are called after tearDown on test failure or success.
Cleanup items are called even if setUp fails (unlike tearDown).
addTypeEqualityFunc( typeobj, function )
Add a type specific assertEqual style function to compare a type.
This method is for use by TestCase subclasses that need to register their own type equality functions to provide nicer error messages.
||The data type to call this function on when both values are of the same type in assertEqual().|
||The callable taking two arguments and an optional msg= argument that raises self.failureException with a useful error message when the two arguments are not equal.|
assertAllClose( a, b, rtol=1e-06, atol=1e-06, msg=None )
Asserts that two structures of numpy arrays or Tensors, have near values.
b can be arbitrarily nested structures. A layer of a nested
structure can be a
The expected numpy