symforce.test_util.test_case module#

class TestCase(methodName='runTest')[source]#

Bases: SymforceTestCaseMixin

Base class for symforce tests. Adds some useful helpers.

Parameters:

methodName (str) –

static should_run_slow_tests()[source]#
Return type:

bool

static main(*args, **kwargs)[source]#

Call this to run all tests in scope.

Parameters:
  • args (Any) –

  • kwargs (Any) –

Return type:

None

setUp()[source]#

Creates list of temporary directories that will be removed before shutdown (unless debug mode is on)

Return type:

None

sympy_only(func)[source]#

Decorator to mark a test to only run on SymPy, and skip otherwise.

Parameters:

func (Callable) –

Return type:

Callable

symengine_only(func)[source]#

Decorator to mark a test to only run on the SymEngine, and skip otherwise.

Parameters:

func (Callable) –

Return type:

Callable

expected_failure_on_sympy(func)[source]#

Decorator to mark a test to be expected to fail only on SymPy..

Parameters:

func (Callable) –

Return type:

Callable

slow_on_sympy(func)[source]#

Decorator to mark a test as slow on sympy. Will be skipped unless passed the --run_slow_tests flag

Parameters:

func (Callable) –

Return type:

Callable