Skip to content

Add unit tests for video sampling, GPMF parser, and exiftool video reading #816

Open
caglarpir wants to merge 3 commits intomainfrom
improve-test-coverage
Open

Add unit tests for video sampling, GPMF parser, and exiftool video reading #816
caglarpir wants to merge 3 commits intomainfrom
improve-test-coverage

Conversation

@caglarpir
Copy link
Contributor

Summary

  • test_sample_video.py (20 tests): New tests for the distance-based video sampling pipeline, covering _within_track_time_range_buffered boundary logic,
    _sample_video_stream_by_distance frame selection, sample_video() parameter validation and rerun behavior, and end-to-end integration with mocked ffmpeg/geotag/MP4 parsing
  • test_gpmf_parser.py (+117 tests): Expand coverage for GPMF parser internals — GPS5/GPS9 timestamp conversion, stream parsing, camera model extraction, matrix operations, KLV
    parsing, telemetry extraction, and extract_gopro_info integration with real test data
  • test_exiftool_read_video.py (84 tests): New test file covering exiftool-based video metadata extraction — GPS track aggregation, sample-time-based track building,
    make/model/serial extraction, and XML parsing for BlackVue, GoPro, and Insta360 formats

┌───────┬─────────────────┬───────────────────────┬───────────────────────────┐
│ │ main │ improve-test-coverage │ delta │
├───────┼─────────────────┼───────────────────────┼───────────────────────────┤
│ Total │ 59% (4496/7633) │ 64% (4884/7579) │ +5pp (+388 stmts covered) │
├───────┼─────────────────┼───────────────────────┼───────────────────────────┤
│ Tests │ 323 passed │ 540 passed │ +217 tests │
└───────┴─────────────────┴───────────────────────┴───────────────────────────┘

@meta-cla meta-cla bot added the cla signed label Mar 3, 2026
@caglarpir caglarpir force-pushed the dead-code-cleanup branch from ca2de86 to ee9ee87 Compare March 3, 2026 12:13
@caglarpir caglarpir force-pushed the improve-test-coverage branch from 85c966b to b0f91ac Compare March 3, 2026 12:13
@caglarpir caglarpir force-pushed the dead-code-cleanup branch from ee9ee87 to 9305a95 Compare March 3, 2026 13:35
@caglarpir caglarpir force-pushed the improve-test-coverage branch from b0f91ac to 568569d Compare March 3, 2026 13:35
@caglarpir caglarpir force-pushed the dead-code-cleanup branch from 9305a95 to bdb7a67 Compare March 3, 2026 13:52
@caglarpir caglarpir force-pushed the improve-test-coverage branch from 568569d to 993a832 Compare March 3, 2026 13:52
…iftool video reading

- sample_video: Add 20 tests for _within_track_time_range_buffered,
  _sample_video_stream_by_distance, rerun behavior, and end-to-end
  distance-based sampling with mocked ffmpeg/geotag/MP4 parsing
- test_gpmf_parser: Expand GPMF parser test coverage; remove tests for
  extract_camera_model (removed in dead-code-cleanup)
- test_exiftool_read_video: Add new test file for exiftool video reading
@caglarpir caglarpir force-pushed the improve-test-coverage branch from 993a832 to e17462f Compare March 3, 2026 14:22
  in GPS parser functions
Base automatically changed from dead-code-cleanup to main March 4, 2026 08:38
Reduce cyclomatic complexity in GPS parser functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant