tests package¶
Submodules¶
tests.conftest module¶
This module contains shared test fixtures such as Catalog and Canvas instances
-
tests.conftest.
apply_func_to_cutout
(patch, mult_by, add_to)¶ function to be used in cutout test
-
tests.conftest.
nside
()¶
-
tests.conftest.
test_canvas
(test_catalog, nside)¶ Create a test canvas to be used in unit tests
-
tests.conftest.
test_catalog
()¶ Create a test catalog to be used in unit tests
tests.test_Canvas module¶
This module contains unit tests for the Catalog class
-
tests.test_Canvas.
test_alm_Cl_outdated_upon_clean_canvas
(test_canvas)¶ Passes if after clean.canvas() the status of pixels, alms, and Cls are correctly updated
-
tests.test_Canvas.
test_alm_Cl_outdated_upon_pixel_change
(test_canvas)¶ Passes if after setting canvas.pixels the status of pixels, alms, and Cls are correctly updated
-
tests.test_Canvas.
test_alm_Cl_outdated_upon_ud_grade
(test_canvas, nside, resolution)¶ Passes if after upgrading and downgrading resolution the status of pixels, alms, and Cls and lmax are correctly updated
-
tests.test_Canvas.
test_cutouts_apply_func_kwarg_types
(test_canvas, mult_by, add_to)¶ Passes if various kwarg types (scalar, list, etc) can be passed to apply func
-
tests.test_Canvas.
test_cutouts_apply_multiple_funcs
(test_canvas)¶ Passes if multiple apply funcs can be applied to patch
-
tests.test_Canvas.
test_error_upon_Cl_change
(test_canvas)¶ Passes if upon setting Cl TypeError is raised
-
tests.test_Canvas.
test_pixel_Cl_outdated_upon_alm_change
(test_canvas)¶ Passes if after setting canvas.alms the status of pixels, alms, and Cls are correctly updated
-
tests.test_Canvas.
test_pixels_are_zero_after_clean
(test_canvas)¶ Passes if all pixels are zero after canvas.clean()
tests.test_Catalog module¶
This module contains unit tests for the Catalog class
-
tests.test_Catalog.
test_catalog_size
(test_catalog)¶ Passes if catalog.size matches the length of data
-
tests.test_Catalog.
test_correct_input
(test_catalog)¶ Passes if coordinates, velocities and Mass is in the input catalog
-
tests.test_Catalog.
test_has_data
(test_catalog)¶ Passes if catalog has a data attribute