Skip to content
This repository was archived by the owner on May 14, 2026. It is now read-only.

better visual tests#3

Merged
cameronbrill merged 15 commits into
mainfrom
cb/better-visual-testing
Sep 8, 2025
Merged

better visual tests#3
cameronbrill merged 15 commits into
mainfrom
cb/better-visual-testing

Conversation

@cameronbrill
Copy link
Copy Markdown
Owner

No description provided.

@cameronbrill cameronbrill requested a review from Copilot September 8, 2025 01:10
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Sep 8, 2025

Test Results

Fast Test Results

23 passed

Test results:
  test_extracts_name_from_dbg_lines_field: tests.map.test_main.TestExtractLineName
  test_extracts_name_from_lines_json_when_dbg_lines_empty: tests.map.test_main.TestExtractLineName
  test_extracts_first_label_from_multiple_lines: tests.map.test_main.TestExtractLineName
  test_falls_back_to_unknown_line_when_no_data: tests.map.test_main.TestExtractLineName
  test_returns_individual_line_names_not_combined: tests.map.test_main.TestExtractLineName
  test_fetches_data_successfully: tests.map.test_main.TestFetchGeojsonData
  test_raises_request_error_on_network_failure: tests.map.test_main.TestFetchGeojsonData
  test_separates_points_and_lines_correctly: tests.map.test_main.TestSeparateGeometries
  test_handles_empty_geometries: tests.map.test_main.TestSeparateGeometries
  test_creates_csv_with_basic_google_maps_format: tests.map.test_main.TestCreateStationsCsv
  test_uses_generic_station_names_not_labels: tests.map.test_main.TestCreateStationsCsv
  test_handles_empty_station_labels_gracefully: tests.map.test_main.TestCreateStationsCsv
  test_includes_description_with_station_names: tests.map.test_main.TestCreateStationsCsv
  test_preserves_polygon_geometry_for_google_maps_tinting: tests.map.test_main.TestExtractBoundaryLine
  test_handles_multipolygon_by_taking_largest: tests.map.test_main.TestExtractBoundaryLine
  test_creates_polygon_wkt_for_google_maps_tinting: tests.map.test_main.TestExtractBoundaryLine
  test_creates_kml_matching_working_google_format: tests.map.test_main.TestCreateSimpleKml
  test_creates_csv_with_wkt_and_description_columns: tests.map.test_main.TestCreateLinesCsv
  test_splits_multi_line_entries_into_separate_rows: tests.map.test_main.TestCreateLinesCsv
  test_handles_mixed_single_and_multi_line_entries: tests.map.test_main.TestCreateLinesCsv
  test_preserves_geometry_for_each_split_line: tests.map.test_main.TestCreateLinesCsv
  test_processes_real_subway_data_correctly: tests.map.test_main.TestIntegrationWithRealData
  test_main_processes_all_endpoints: tests.map.test_main.TestMainFunctionIntegration
This test report was produced by the test-summary action.  Made with ❤️ in Cambridge.
Slow Test Results

7 passed

Test results:
  test_munich_boundary_basemap_overlay: tests.map.test_visual.TestMunichBasemap
  test_munich_boundary_different_providers: tests.map.test_visual.TestMunichBasemap
  test_munich_complete_transit_system: tests.map.test_visual.TestMunichCompleteSystem
  test_munich_complete_transit_system_voyager: tests.map.test_visual.TestMunichCompleteSystem
  test_munich_subway_system: tests.map.test_visual.TestMunichTransitSystems
  test_munich_tram_system: tests.map.test_visual.TestMunichTransitSystems
  test_munich_commuter_rail_system: tests.map.test_visual.TestMunichTransitSystems
This test report was produced by the test-summary action.  Made with ❤️ in Cambridge.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the visual testing framework to improve test organization and leverage the contextily library for basemap rendering. The changes move away from a centralized create_visual_map function to individual test methods that directly use matplotlib and contextily for creating transit system visualizations.

  • Replaces the comprehensive visual snapshot testing approach with more granular, system-specific tests
  • Introduces contextily-based basemap rendering directly in test methods
  • Restructures test fixtures to load individual transit system data separately

Reviewed Changes

Copilot reviewed 3 out of 16 changed files in this pull request and generated 4 comments.

File Description
tests/map/test_visual.py Complete rewrite of visual tests with contextily integration and granular test structure
mise.toml Adds sources configuration for the slow test task
core/map/main.py Removes the create_visual_map function and fixes variable naming

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread tests/map/test_visual.py Outdated
Comment thread tests/map/test_visual.py Outdated
Comment thread tests/map/test_visual.py Outdated
Comment thread tests/map/test_visual.py Outdated
@cameronbrill cameronbrill force-pushed the cb/better-visual-testing branch 2 times, most recently from 345a30e to 2abed48 Compare September 8, 2025 06:21
Copy link
Copy Markdown
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@cameronbrill cameronbrill force-pushed the cb/better-visual-testing branch from 2abed48 to 3481fb3 Compare September 8, 2025 06:30
Repository owner deleted a comment from github-actions Bot Sep 8, 2025
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Sep 8, 2025

📸 Visual Test Snapshots Comparison

No visual changes detected - all snapshot tests passed! ✅

The visual snapshots match the expected references. No updates needed.

@cameronbrill cameronbrill force-pushed the cb/better-visual-testing branch from 1fdf92c to 2891572 Compare September 8, 2025 07:07
@cameronbrill cameronbrill merged commit c750aa8 into main Sep 8, 2025
5 checks passed
@cameronbrill cameronbrill deleted the cb/better-visual-testing branch September 8, 2025 22:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants