nansat.tests package
Subpackages
Submodules
nansat.tests.nansat_test_base module
nansat.tests.nansat_test_data module
nansat.tests.test_domain module
- class nansat.tests.test_domain.DomainTest(methodName='runTest')
Bases:
TestCase- setUp()
Hook method for setting up the test fixture before exercising it.
- test_dont_init_from_invalid_combination()
- test_init_from_GDALDataset()
- test_init_from_GDALDataset_and_srs()
- test_dont_init_if_gdal_AutoCreateWarpedVRT_fails(mock_gdal)
- test_init_from_srs_and_ext_te(mock__get_geotransform, mock__create_extent_dict)
- test_init_from_srs_and_ext_lle(mock__get_geotransform, mock__convert_extentDic, mock__create_extent_dict)
- test_init_lonlat()
- test_init_from_lonlat()
- test_init_from_lonlat_no_gcps()
- test_repr(mock_get_corners)
- test_write_kml()
- test_get_geolocation_grids_from_GDAL_transformer(mock_transform_points)
- test_get_geolocation_grids_from_geolocationArray()
- test_convert_extentDic()
- test_add_to_dict()
- test_validate_ts_tr()
- test_validate_te_lle()
- test_check_size()
- test_gen_regexp()
- test_create_extent_dict()
- test_get_border()
- test_compound_row_col_vectors()
- test_get_row_col_vector()
- test_get_border_wkt()
- test_get_border_geometry()
- test_border_geojson()
- test_overlaps_intersects_and_contains()
- test_contains()
- test_get_border_postgis()
- test_get_corners()
- test_get_min_max_lon_lat()
- test_get_pixelsize_meters()
- test_get_geotransform()
- test_transform_tr()
- test_transform_ts2()
- test_transform_points()
- test_transform_points_inverse()
- test_transform_points_dstsrs()
- test_azimuth_y(mock_get_geolocation_grids)
- test_shape()
- test_reproject_gcps()
- test_reproject_gcps_auto()
- test_intersects(get_border_geometry)
- test_overlaps(get_border_geometry)
- test_get_border_dateline()
nansat.tests.test_exporter module
- class nansat.tests.test_exporter.ExporterTest(methodName='runTest')
Bases:
NansatTestBase- test_export__with_nan_values()
Test that a band with nan-values is masked as expected, that global attribute names are the same as the Nansat metadata, and that variable names are the same as the Nansat band names without appended numbers.
- test_geolocation_of_exportedNC_vs_original()
Lon/lat in original and exported file should coincide
- test_special_characters_in_exported_metadata()
- test_time_coverage_metadata_of_exported_equals_original()
- test_export_netcdf()
Test export and following import of data with bands containing np.nan values
- test_export_gcps_to_netcdf()
Should export file with GCPs and write correct bands
- test_export_gcps_complex_to_netcdf()
Should export file with GCPs and write correct complex bands
- test_export_gtiff()
- test_export_band()
- test_export_band_by_name()
- test_reproject_and_export_band()
- test_export_selected_bands()
- test_export_option()
- test_export2thredds_arctic_long_lat()
- test_dont_export2thredds_gcps()
- test_export2thredds_longlat_list()
- test_export2thredds_longlat_dict()
- test_export_netcdf_complex_remove_meta()
- test_export_netcdf_arctic()
- test_export_netcdf_arctic_hardcopy()
- test_export_add_geoloc(mock_add_geolocation)
- test_export2thredds_rmmetadata()
- class nansat.tests.test_exporter.TestExporter__export2thredds(methodName='runTest')
Bases:
NansatTestBase- setUp()
Hook method for setting up the test fixture before exercising it.
- tearDown()
Hook method for deconstructing the test fixture after testing it.
- test_example1()
- test_example2()
- test_example3()
nansat.tests.test_figure module
- class nansat.tests.test_figure.FigureTest(methodName='runTest')
Bases:
NansatTestBase- test_init_array()
- test_get_auto_ticks_number()
- test_get_auto_ticks_vector()
- test_add_latlon_grids_auto()
Should create figure with lon/lat gridlines spaced automatically
- test_add_latlon_grids_number()
Should create figure with lon/lat gridlines given manually
- test_add_latlon_grids_list()
Should create figure with lon/lat gridlines given manually
- test_get_tick_index_from_grid()
Should return indeces of pixel closest to ticks
- test_apply_logarithm(mock1)
- test_make_transparent_color(mock1)
nansat.tests.test_geolocation module
nansat.tests.test_nansat module
- class nansat.tests.test_nansat.NansatTest(methodName='runTest')
Bases:
NansatTestBase- test_open_gcps()
- test_that_only_mappers_with_mapper_in_the_module_name_are_imported()
- test_get_time_coverage_start_end()
- test_from_domain_array()
- test_from_domain_nansat()
- test_add_band()
- test_add_band_twice()
- test_add_bands()
- test_add_bands_no_parameter()
- test_add_subvrts_only_to_one_nansat()
- test_bands()
- test_has_band_if_name_matches()
- test_has_band_if_standard_name_matches()
- test_write_fig_tif()
- test_resize_by_pixelsize()
- test_resize_by_factor()
- test_resize_by_width()
- test_resize_by_height()
- test_resize_resize()
- test_resize_complex_alg_average()
- test_resize_complex_alg0()
- test_resize_complex_alg1()
- test_resize_complex_alg2()
- test_resize_complex_alg3()
- test_resize_complex_alg4()
- test_get_GDALRasterBand()
- test_get_GDALRasterBand_if_band_id_is_given()
- test_list_bands_true()
- test_list_bands_false()
- test_reproject_domain()
- test_reproject_domain_if_dst_domain_is_given()
- test_reproject_domain_if_resample_alg_is_given()
- test_reproject_domain_if_source_and_destination_domain_span_entire_lons(mock_Nansat)
- test_reproject_domain_if_tps_is_given()
- test_reproject_of_complex()
Should return np.nan in areas out of swath
- test_add_band_and_reproject()
Should add band and swath mask and return np.nan in areas out of swath
- test_reproject_no_addmask()
Should not add swath mask and return 0 in areas out of swath
- test_reproject_stere()
- test_reproject_gcps()
- test_reproject_gcps_on_repro_gcps()
- test_reproject_gcps_resize()
- test_undo()
- test_write_figure()
- test_write_figure_band()
- test_write_figure_clim()
- test_write_figure_legend()
- test_write_figure_logo()
- test_write_geotiffimage()
- test_write_geotiffimage_if_band_id_is_given()
- test_get_metadata()
- test_get_metadata_key()
- test_get_metadata_wrong_key()
- test_get_metadata_band_id()
- test_set_metadata()
- test_set_metadata_band_id()
- test_get_band_number()
- test_get_transect()
- test_get_transect_outside()
- test_get_transect_wrong_points()
- test_get_transect_wrong_band()
- test_get_transect_pixlin()
- test_get_transect_data()
- test_digitize_points(mock_PointBrowser)
shall create PointBrowser and call PointBrowser.get_points()
- test_crop()
- test_crop_gcpproj()
- test_crop_complex()
- test_crop_no_gcps_arctic()
- test_crop_lonlat()
- test_crop_outside()
- test_watermask()
if watermask data exists: should fetch array with watermask else: should raise an error
- test_watermask_fail_if_mod44path_is_wrong()
Nansat.watermask should raise an IOError
- test_watermask_fail_if_mod44path_not_exist()
Nansat.watermask should raise an IOError
- test_init_no_arguments()
No arguments should raise ValueError
- test_get_item_basic_expressions()
Testing get_item with some basic expressions
- test_get_item_inf_expressions()
inf should be replaced with nan
- test_repr_basic()
repr should include some basic elements
- test_getitem(mock_Nansat)
- test_crop_interactive(mock_digitize_points)
- test_extend()
- test_open_no_mapper()
- test_get_metadata_unescape(vrt)
- test_reproject_pure_geolocation()
nansat.tests.test_node module
nansat.tests.test_nsr module
nansat.tests.test_pixelfunctions module
nansat.tests.test_pointbrowser module
- class nansat.tests.test_pointbrowser.PointBrowserTest(methodName='runTest')
Bases:
TestCase- setUp()
Hook method for setting up the test fixture before exercising it.
- test_init()
Create Pointbrowser
- test_onclick()
Mimic click
- test_onclick_none()
Mimic click outside figure
- test_onclick_key_z()
Mimic click with ‘z’ pressed
- test_onclick_key()
Mimic click with ‘anykey’ pressed
- test_convert_coordinates()
Mimic click with ‘anykey’ pressed
- test_get_points(plt_mock)
nansat.tests.test_tools module
- class nansat.tests.test_tools.ToolsTest(methodName='runTest')
Bases:
TestCase- setUp()
Hook method for setting up the test fixture before exercising it.
- test_distance2coast_source_not_exists_envvar(mock_getenv)
- test_distance2coast_source_not_exists_attribute()
- test_distance2coast_integration(Nansat, os)
- test_warning()
- test_get_domain_map()
- test_get_domain_map_no_cartopy()
- test_save_domain_map()
nansat.tests.test_vrt module
- class nansat.tests.test_vrt.VRTTest(methodName='runTest')
Bases:
NansatTestBase- nsr_wkt = 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]'
- test_init(mock_make_filename)
- test_del(mock_make_filename)
- test_from_gdal_dataset(_init_from_gdal_dataset)
- test_init_from_gdal_dataset(_add_geolocation)
- test_from_dataset_params()
- test_from_array()
- test_from_lonlat()
- test_from_lonlat_no_gcps()
- test_copy_empty_vrt()
- test_copy_vrt_with_band()
- test_copy_vrt_pixel_func()
- test_copy_geolocation()
- test_export()
- test_create_band()
- test_make_source_bands_xml()
- test_set_add_band_options()
- test_remove_geotransform()
- test_set_geotransform_for_resize()
- test_set_gcps_geolocation_geotransform_with_geolocation()
- test_set_gcps_geolocation_geotransform_with_gcps()
- test_set_gcps_geolocation_geotransform_with_geotransform()
- test_update_warped_vrt_xml()
- test_set_fake_gcps_empty()
- test_set_fake_gcps()
- test_get_dst_band_data_type()
- test_create_band_name_no_wkv()
- test_create_band_name_wkv()
- test_create_band_name_existing_name()
- test_create_band_name_wkv_and_name()
- test_leave_few_bands()
- test_find_complex_band()
- test_split_complex_bands()
- test_create_geolocation_bands()
- test_fix_band_metadata()
- test_fix_global_metadata()
- test_hardcopy_bands()
- test_get_projection_dataset(dataset)
- test_get_projection_gcps(dataset)
- test_get_projection_geolocation(dataset)
- test_get_projection_raises_NansatProjectionError(dataset)
- test_repr()
- test_add_swath_mask_band(create_band)
- test_remove_strings_in_metadata_keys()
- test_super_vrt_of_geolocation_bands()
- test_get_shifted_vrt()
- test_get_super_vrt()
- test_get_super_vrt_geolocation()
- test_get_super_vrt_and_copy()
- test_get_sub_vrt0()
- test_get_sub_vrt3()
- test_get_sub_vrt_steps_0()
- test_transform_points()
- test_make_filename()
- test_transform_coordinates_list()
- test_transform_coordinates_1d_array()
- test_transform_coordinates_2d_array()
- test_reproject_gcps()