TestCase

class ase2sprkkr.common.init_tests.TestCase(methodName='runTest')[source]

A testcase class with some usefull assertions and a better numpy arrays comparison

Class hierarchy

Inheritance diagram of ase2sprkkr.common.init_tests.TestCase

Constructor

__init__(methodName='runTest')[source]

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

assertAsyncEqual(a, b)[source]
assertAsyncRaises(a, b)[source]
assertAlmostEqual(a, b)[source]

Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero, or by comparing that the difference between the two objects is more than the given delta.

Note that decimal places (from zero) are usually not the same as significant digits (measured from the most significant digit).

If the two objects compare equal then they will automatically compare almost equal.

static runAsync(corr)[source]
setUp()[source]

Register numpy array for the equality