Skip to content

Consolidate duplicate test cases#422

Merged
Snuffy2 merged 5 commits into
custom-components:masterfrom
Snuffy2:Optimize-tests
May 31, 2026
Merged

Consolidate duplicate test cases#422
Snuffy2 merged 5 commits into
custom-components:masterfrom
Snuffy2:Optimize-tests

Conversation

@Snuffy2

@Snuffy2 Snuffy2 commented May 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

Simplifies the test suite by removing redundant one-off tests and folding duplicated scenarios into existing parameterized coverage. This keeps behavior coverage intact while reducing test maintenance noise.

What Changed

  • Removed duplicate tests already covered by parameterized cases in sensor, tracker, update sensor, integration, config flow, display option, parse OSM, persistence, and OSM client tests.
  • Added missing parameter rows where one-off edge cases had useful assertions, including GPS accuracy, nonnumeric coordinates, legacy persistence failure modes, cached OSM payload shapes, tracker state variants, and city-clean normalization.
  • Preserved specific regression assertions while consolidating repeated setup and duplicated test bodies.

Why

The suite had several AI-generated cleanup candidates: standalone tests that repeated the same setup and behavior already covered elsewhere, plus adjacent tests differing only by one input value.

Parameterizing those cases keeps the coverage explicit while making the suite easier to scan and maintain.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report

This PR does not seem to contain any modification to coverable code.

@Snuffy2
Snuffy2 merged commit 393d35d into custom-components:master May 31, 2026
6 of 7 checks passed
@Snuffy2
Snuffy2 deleted the Optimize-tests branch May 31, 2026 16:06
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