Skip to content

ENH: Modernize Testing Infrastructure - #330

Merged
RHammond2 merged 27 commits into
NatLabRockies:developfrom
RHammond2:enhancement/unittest-pytest-conversion
Oct 30, 2026
Merged

RHammond2 merged 27 commits into
NatLabRockies:developfrom
RHammond2:enhancement/unittest-pytest-conversion

Conversation

@RHammond2

@RHammond2 RHammond2 commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

This PR converts the testing from a class-based and unittest-powered infrastructure to a function-based pytest-powered infrastructure. Additionally, generalized fixtures have been adopted for the project ENGIE data creation and resetting of the random number generators.

Some test values have been updated in the following places.

  • test/unit/test_ml_toolkit.py::test_algorithm_defaults: 7 iterations are now run for the random search, so the best fit RMSE has increased.
  • test/unit/test_timeseries_toolkit::test_convert_local_to_utc: previously checked for a generic Exception that was actually raised due to an improper use of passing a non-callable to unittest.assertRaises.
  • test/regression/test_long_term_monte_carlo_aep.py: left largely untouched so that it can be handled in the updates introduced in Replace pyGAM with TweedieRegressor in MachineLearningSetup #329.
  • test/regression/wake_losses.py: UQ-based test discrepancies have been identified as stemming from differences in MacOS runs, so an acceptable deviation has been added to the test results.
  • test/regression/yaw_misalignment.py: Reenables the 95% CI tests, and adjusts the results to allow for MacOS variations similar to the wake loss checks.

@RHammond2 RHammond2 added the maintenance Issues related to code maintainence. E.g., upgrading versions of dependencies, fixing the CI pipelie label Oct 28, 2026
@RHammond2 RHammond2 changed the title Draft: ENH: Modernize Testing Infrastructure ENH: Modernize Testing Infrastructure Oct 30, 2026
@RHammond2
RHammond2 merged commit d567293 into NatLabRockies:develop Oct 30, 2026
10 checks passed
@RHammond2
RHammond2 deleted the enhancement/unittest-pytest-conversion branch October 30, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement maintenance Issues related to code maintainence. E.g., upgrading versions of dependencies, fixing the CI pipelie

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant