Skip to content

Unit test improvements - #2557

Draft
GernotMaier wants to merge 6 commits into
mainfrom
unit-test-review
Draft

GernotMaier wants to merge 6 commits into
mainfrom
unit-test-review

Conversation

@GernotMaier

Copy link
Copy Markdown
Contributor

Only test improvements, no change in production code.

  • Removed the duplicate mirror parameter test.
  • Strengthened CORSIKA forwarding, tolerance, model parameter state, and generated report assertions.
  • Added event reader edge cases, Monte Carlo spectral weighting checks, and camera analysis checks.
  • Used tmp_test_directory in the edited file-writing tests.

@GernotMaier GernotMaier self-assigned this Sep 25, 2026
@GernotMaier GernotMaier added no-changelog-needed No Changelog entry required for this PR Copilot review AI-supported Copilot review labels Sep 25, 2026
@GernotMaier
GernotMaier requested a balanced review from Copilot September 25, 2026 14:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The event-limit test misses a concrete multi-telescope overflow case, and reporting field type checks were weakened.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity · 1 Low severity

Open (2)
What changed in this PR

Improves unit-test coverage and assertion precision across simulation, reporting, model, and camera components.

Changes:

  • Adds edge-case and numerical behavior tests.
  • Strengthens mock forwarding and generated-report assertions.
  • Standardizes edited file-writing tests on tmp_test_directory.
File Description
tests/​unit_tests/​simtel/​test_simtel_event_reader.py Adds missing-data, logging, and event-limit cases.
tests/​unit_tests/​reporting/​test_docs_read_parameters.py Updates temporary paths and report assertions.
tests/​unit_tests/​production_configuration/​test_monte_carlo_statistics_estimator.py Tests spectral integration and weighting.
tests/​unit_tests/​model/​test_model_parameter.py Strengthens state preservation and schema-call checks.
tests/​unit_tests/​model/​test_mirrors.py Removes a duplicate mirror test.
tests/​unit_tests/​corsika/​test_corsika_output_validator.py Verifies argument forwarding and event tolerance.
tests/​unit_tests/​camera/​test_camera_efficiency.py Tests analysis prerequisites and derived efficiencies.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/unit_tests/simtel/test_simtel_event_reader.py
Comment thread tests/unit_tests/reporting/test_docs_read_parameters.py
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI and others added 2 commits September 25, 2026 15:00
Co-authored-by: GernotMaier <14001688+GernotMaier@users.noreply.github.com>
Co-authored-by: GernotMaier <14001688+GernotMaier@users.noreply.github.com>
@ctao-sonarqube

Copy link
Copy Markdown

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Copilot review AI-supported Copilot review no-changelog-needed No Changelog entry required for this PR

Development

Successfully merging this pull request may close these issues.

3 participants