TestCenter Reference
Macros.py File Reference

Go to the source code of this file.

Namespaces

namespace  TestSupport
 A package of python modules helping to build tests.
 
namespace  TestSupport.Macros
 Adds GoogleTest like methods.
 

Functions

 TestSupport.Macros.ASSERT_TRUE (expr, msg=None, logOnSuccess=None)
 Throw exception if given expression does not evaluate to true.
 
 TestSupport.Macros.EXPECT_TRUE (expr, msg=None, logOnSuccess=None)
 Expect given expression to evaluate to true.
 
 TestSupport.Macros.ASSERT_FALSE (expr, msg=None, logOnSuccess=None)
 Throw exception if given expression does not evaluate to false.
 
 TestSupport.Macros.EXPECT_FALSE (expr, msg=None, logOnSuccess=None)
 Expect given expression to evaluate to false.
 
 TestSupport.Macros.ASSERT_EQ (expected, actual, msg=None, logOnSuccess=None)
 Throw exception if given values are not equal.
 
 TestSupport.Macros.EXPECT_EQ (expected, actual, msg=None, logOnSuccess=None)
 Expect given values to be equal.
 
 TestSupport.Macros.ASSERT_NE (expected, actual, msg=None, logOnSuccess=None)
 Throw exception if given values are equal.
 
 TestSupport.Macros.EXPECT_NE (expected, actual, msg=None, logOnSuccess=None)
 Expect given values to be not equal.
 
 TestSupport.Macros.ASSERT_GT (a, b, msg=None, logOnSuccess=None)
 Throw exception if first given value is less than or equal to the second.
 
 TestSupport.Macros.EXPECT_GT (a, b, msg=None, logOnSuccess=None)
 Expect first given value to be greater than the second.
 
 TestSupport.Macros.ASSERT_GE (a, b, msg=None, logOnSuccess=None)
 Throw exception if first given value is less than the second.
 
 TestSupport.Macros.EXPECT_GE (a, b, msg=None, logOnSuccess=None)
 Expect first given value to be greater than or equal to the second.
 
 TestSupport.Macros.ASSERT_LT (a, b, msg=None, logOnSuccess=None)
 Throw exception if first given value is not less than the second.
 
 TestSupport.Macros.EXPECT_LT (a, b, msg=None, logOnSuccess=None)
 Expect first given value to be less than the second.
 
 TestSupport.Macros.ASSERT_LE (a, b, msg=None, logOnSuccess=None)
 Throw exception if first given value is not less than or equal to the second.
 
 TestSupport.Macros.EXPECT_LE (a, b, msg=None, logOnSuccess=None)
 Expect first given value to be less than or equal to the second.
 
 TestSupport.Macros.ASSERT_FLOAT_EQ (expected, actual, msg=None, epsilon=0.0001, logOnSuccess=None)
 Throw exception if given values are not equal.
 
 TestSupport.Macros.EXPECT_FLOAT_EQ (expected, actual, msg=None, epsilon=0.0001, logOnSuccess=None)
 Expect given values to be equal.
 
 TestSupport.Macros.ASSERT_FLOAT_NE (expected, actual, msg=None, epsilon=0.0001, logOnSuccess=None)
 Throw exception if given values are equal.
 
 TestSupport.Macros.EXPECT_FLOAT_NE (expected, actual, msg=None, epsilon=0.0001, logOnSuccess=None)
 Expect given values to be not equal.
 
 TestSupport.Macros.ASSERT_FLOAT_GT (a, b, msg=None, logOnSuccess=None)
 Throw exception if first given value is not greater than the second.
 
 TestSupport.Macros.EXPECT_FLOAT_GT (a, b, msg=None, logOnSuccess=None)
 Expect first given value to be greater than the second.
 
 TestSupport.Macros.ASSERT_FLOAT_GE (a, b, msg=None, epsilon=0.0001, logOnSuccess=None)
 Throw exception if first given value is not greater than or equal to the second.
 
 TestSupport.Macros.EXPECT_FLOAT_GE (a, b, msg=None, epsilon=0.0001, logOnSuccess=None)
 Expect first given value to be greater than or equal to the second.
 
 TestSupport.Macros.ASSERT_FLOAT_LT (a, b, msg=None, logOnSuccess=None)
 Throw exception if first given value is not less than the second.
 
 TestSupport.Macros.EXPECT_FLOAT_LT (a, b, msg=None, logOnSuccess=None)
 Expect first given value to be less than the second.
 
 TestSupport.Macros.ASSERT_FLOAT_LE (a, b, msg=None, epsilon=0.0001, logOnSuccess=None)
 Throw exception if first given value is not less than or equal to the second.
 
 TestSupport.Macros.EXPECT_FLOAT_LE (a, b, msg=None, epsilon=0.0001, logOnSuccess=None)
 Expect first given value to be less than or equal to the second.
 
 TestSupport.Macros.EXPECT_EMPTY (a, msg=None, logOnSuccess=None)
 Expect given container to be empty.
 
 TestSupport.Macros.ASSERT_EMPTY (a, msg=None, logOnSuccess=None)
 Throw exception if given container is not empty.
 
 TestSupport.Macros.EXPECT_NOT_EMPTY (a, msg=None, logOnSuccess=None)
 Expect given container to be not empty.
 
 TestSupport.Macros.ASSERT_NOT_EMPTY (a, msg=None, logOnSuccess=None)
 Throw exception if given container is empty.
 
 TestSupport.Macros.EXPECT_SIZE (a, size, msg=None, logOnSuccess=None)
 Expect given container to have the given size.
 
 TestSupport.Macros.ASSERT_SIZE (a, size, msg=None, logOnSuccess=None)
 Throw exception if given container does not have the given size.
 
 TestSupport.Macros.EXPECT_PATH_EXISTS (path, msg=None, logOnSuccess=None)
 Expect the given path to exist.
 
 TestSupport.Macros.EXPECT_PATH_MISSING (path, msg=None, logOnSuccess=None)
 Expect the given path to be missing, i.e.
 
 TestSupport.Macros.ASSERT_PATH_EXISTS (path, msg=None, logOnSuccess=None)
 Throw exception if given path does not exists.
 
 TestSupport.Macros.ASSERT_PATH_MISSING (path, msg=None, logOnSuccess=None)
 Throw exception if given path is not missing, i.e.
 
 TestSupport.Macros.INFO (msg)
 Create an info message.
 
 TestSupport.Macros.WARNING (msg)
 Create a warning message.
 
 TestSupport.Macros.ERROR (msg)
 Create an error message.
 
 TestSupport.Macros.DEBUG_STOP ()
 Stops a test immediately for debugging purposes.