Running the tests

The tests are written assuming they will be run with pytest using the Astropy custom test runner. To set up a Conda environment to run the full set of tests, install macro_lightning or see the setup.cfg file for dependencies. Once the dependencies are installed, you can run the tests two ways:

  1. By importing macro_lightning:

    import macro_lightning
    macro_lightning.test()
    
  2. By cloning the macro_lightning repository and running:

    tox -e test
    

Reference/API

The test functions.

macro_lightning.tests.test_parameters Module

Test parameters.

Functions

test_solar_system_vesc_params()

Test solar_system_vesc_params.

test_vesc_sun_at_R()

Test vesc_sun_at_R().

macro_lightning.tests.test_plot Module

Test plot.

Functions

test_plot_atomic_density_line()

Test plot_atomic_density_line().

test_plot_nuclear_density_line()

Test plot_nuclear_density_line().

test_plot_black_hole_line()

Test plot_black_hole_line().

test_plot_reference_densities()

Test plot_reference_densities().

test_plot_mica_constraints()

Test plot_mica_constraints().

test_plot_white_dwarf_constraints()

Test plot_white_dwarf_constraints().

test_plot_cmb_constraints()

Test plot_cmb_constraints().

test_plot_superbursts_constraints()

Test plot_superbursts_constraints().

test_plot_humandeath_constraints()

Test plot_humandeath_constraints().

test_plot_dfn_constraints()

Test plot_dfn_constraints().

test_plot_lensing_constraints()

Test plot_lensing_constraints().

test_plot_black_hole_constraints()

Test plot_black_hole_constraints().

test_empty_constraints_plot()

Test constraints_plot().

test_full_constraints_plot()

Test constraints_plot().

macro_lightning.tests.test_utils Module

Test utils.

Functions

test_as_quantity()

Test as_quantity().

test_qsquare()

Test qsquare().

test_qnorm()

Test qnorm().

test_qarange()

Test qarange().