Other tests

Examples

Tests for plotting examples

class tests.test_examples.ExampleTest(methodName='runTest')

Bases: TestCase

static test_plot_chapman_jouguet()
static test_plot_const_cs_xi_v()
static test_plot_const_cs_xi_v_w()
static test_plot_delta_theta()
static test_plot_model_comparison()
static test_plot_old_new()
static test_plot_standard_model()

Performance

Performance tests

tests.test_performance.NUMBA_HAS_GET_NUM_THREADS: bool = True

Whether the installed Numba has support for setting the number of threads

class tests.test_performance.TestPerformance(methodName='runTest')

Bases: TestCase

static run_and_log(name, setup, command, number, num_threads, file=None)
Parameters:
  • name (str)

  • setup (str)

  • command (str)

  • number (int)

  • num_threads (int)

  • file (TextIO)

classmethod run_with_different_threads(name, setup, command, number)
Parameters:
  • name (str)

  • setup (str)

  • command (str)

  • number (int)

classmethod test_performance_gw()
classmethod test_performance_sin_transform()

Speedup

Unit tests for the speedup module

class tests.test_speedup.TestSpeedup(methodName='runTest')

Bases: TestCase

Test the functions in the speedup module

static test_gradient()
static test_logspace()
static test_spline()
static test_spline_linear()

Test the Numba JIT-compiled version of splev

tests.test_speedup.jitted_spline(x, tck, der=0, ext=0)

JIT-compiled version of splev, which uses the Numba overload defined in the speedup module

Parameters: