Skip to content

Remove changed integration test and add unit test for new method#2

Closed
Copilot wants to merge 3 commits intohandle-failed-simulations-in-adaptive-samplingfrom
copilot/remove-integration-test-add-unit-test
Closed

Remove changed integration test and add unit test for new method#2
Copilot wants to merge 3 commits intohandle-failed-simulations-in-adaptive-samplingfrom
copilot/remove-integration-test-add-unit-test

Conversation

Copy link
Copy Markdown

Copilot AI commented Dec 1, 2025

Description and Context: What and Why?

This PR removes the DefectivePark91aWrapper from the integration test test_logpdf_gaussian_process.py and creates a dedicated unit test for the _filter_failed_evaluations method in the AdaptiveSampling class.

Changes Made

  • Reverted integration test: Removed DefectivePark91aWrapper class and itertools import from tests/integration_tests/models/test_logpdf_gaussian_process.py, restoring the driver to use park91a_hifi_on_grid directly
  • Added unit test: Created tests/unit_tests/iterators/test_adaptive_sampling.py with comprehensive tests for _filter_failed_evaluations:
    • test_filter_failed_evaluations_no_failures - Tests when there are no NaN values
    • test_filter_failed_evaluations_some_failures - Tests when some evaluations contain NaN
    • test_filter_failed_evaluations_all_failures - Tests when all evaluations fail
    • test_filter_failed_evaluations_multiple_calls - Tests that failed evaluations accumulate across multiple calls

Related Issues and Pull Requests

  • Related to the commit that introduced _filter_failed_evaluations method in AdaptiveSampling

Interested Parties

Note: More information on the merge request procedure in QUEENS can be found in the Submit a pull request section in the CONTRIBUTING.md file.

Original prompt

remove the changed integration test and do a unit test instead, testing the newly added method


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

rjoussen and others added 2 commits November 24, 2025 16:55
…t for _filter_failed_evaluations

Co-authored-by: rjoussen <190478390+rjoussen@users.noreply.github.com>
@rjoussen
Copy link
Copy Markdown
Owner

rjoussen commented Dec 1, 2025

@copilot just write the python files, I will test myself

Copy link
Copy Markdown
Author

Copilot AI commented Dec 1, 2025

@copilot just write the python files, I will test myself

The changes are complete in commit a7c1a58. I've removed the DefectivePark91aWrapper from the integration test and created a new unit test file at tests/unit_tests/iterators/test_adaptive_sampling.py with tests for the _filter_failed_evaluations method.

Copilot AI changed the title [WIP] Remove changed integration test and add unit test for new method Remove changed integration test and add unit test for new method Dec 1, 2025
@rjoussen rjoussen force-pushed the handle-failed-simulations-in-adaptive-sampling branch from 888d627 to 414a3e1 Compare December 1, 2025 13:47
@rjoussen rjoussen closed this Dec 1, 2025
@rjoussen rjoussen deleted the copilot/remove-integration-test-add-unit-test branch December 1, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants