pycoast.tests.test_pycoast module
Main unit tests for pycoast.
- class pycoast.tests.test_pycoast.FakeAreaDef(proj4_string, area_extent, x_size, y_size)
Bases:
object
A fake area definition object.
- class pycoast.tests.test_pycoast.TestContourWriterPIL
Bases:
_ContourWriterTestBase
Test PIL-based contour writer.
- test_add_cities_cfg_pil()
- test_add_cities_from_dict_pil()
- test_add_cities_pil()
- test_add_grid_from_dict_pil()
- test_add_one_shapefile_from_cfg_pil()
- test_add_points_bad_coord_ref()
- test_add_points_bad_image_coords()
- test_add_points_coordinate_conversion()
Check that a point added with lonlat coordinates matches the same point in pixel coordinates.
- test_add_points_pil()
- test_add_polygon()
- test_add_shapefile_shapes()
- test_add_shapefiles_from_dict_pil()
- test_config_file_coasts_and_grid()
- test_config_file_points_and_borders_pil()
- test_dateline_boundary_cross()
- test_dateline_cross()
- test_eastern_shapes_pil()
- test_europe()
- test_europe_file()
- test_geos()
- test_grid()
- test_grid_file()
- test_grid_geos()
- test_grid_geos_with_text()
- test_grid_germ()
Check that issue #26 is fixed.
- test_grid_nh()
- test_no_h_scratch_pil()
- test_no_v_scratch_pil()
- test_western_shapes_pil()
- class pycoast.tests.test_pycoast.TestContourWriterPILAGG
Bases:
_ContourWriterTestBase
Test AGG contour writer.
- test_add_cities_agg()
- test_add_cities_cfg_agg()
- test_add_cities_from_dict_agg()
- test_add_grid_from_dict_agg()
- test_add_one_shapefile_from_cfg_agg()
- test_add_points_agg()
- test_add_polygon_agg()
- test_add_shapefile_shapes_agg()
- test_add_shapefiles_from_dict_agg()
- test_coastlines_convert_to_rgba_agg()
- test_config_file_coasts_and_grid()
- test_config_file_points_and_borders_agg()
- test_eastern_shapes_agg()
- test_europe_agg()
- test_europe_agg_file()
- test_geos_agg()
- test_grid_agg()
- test_grid_agg_file()
- test_grid_agg_txt()
- test_grid_geos_agg()
- test_grid_nh_agg()
- test_no_h_scratch_agg()
- test_no_v_scratch_agg()
- test_western_shapes_agg()
- class pycoast.tests.test_pycoast.TestFromConfig
Bases:
object
Test burning overlays from a config file.
- test_cache(tmpdir)
Test generating a transparent foreground and cache it.
- test_caching_with_param_changes(tmpdir)
Testing caching when changing parameters.
- test_foreground()
Test generating a transparent foreground.
- test_get_resolution()
Get the automagical resolution computation.
- pycoast.tests.test_pycoast.fft_metric(data1, data2, max_value=0.1, plot_failure=False)
Execute FFT metric.
- pycoast.tests.test_pycoast.fft_proj_rms(a1, a2)
Compute the RMS of differences between FFT vectors of a1 and projection of FFT vectors of a2.
This metric is sensitive to large scale changes and image noise but insensitive to small rendering differences.