-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make nsga2 tests optional + docs update #351
Conversation
Codecov Report
@@ Coverage Diff @@
## main #351 +/- ##
===========================================
- Coverage 84.42% 72.51% -11.92%
===========================================
Files 22 22
Lines 3307 3307
===========================================
- Hits 2792 2398 -394
- Misses 515 909 +394 see 7 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Bump @lamkina |
@@ -43,6 +50,9 @@ def setup_optProb(self, n_obj): | |||
if n_obj == 2: | |||
self.optProb.addObj("obj2") | |||
|
|||
@unittest.skipIf( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am sorry to have checked this too late @nwu63 , but I don't really get the point of this step here. Can't we remove this altogether? We are already skipping all n_obj == 2
tests by default on all platforms. Is this related to an additional test that testflo
runs on windows?
Locally I only have the last two tests of this stack:
about to run test_nsga2_multi_objective.py:TestNSGA2.test_opt .\test_nsga2_multi_objective.py:TestNSGA2.test_opt ... SKIP (00:00:0.00, 0 MB)
test_nsga2_multi_objective.py fails on windows with two objectives! Skipping for now.
about to run test_nsga2_multi_objective.py:TestNSGA2.test_opt_0 .\test_nsga2_multi_objective.py:TestNSGA2.test_opt_0 ... OK (00:00:4.17, 0 MB)
about to run test_nsga2_multi_objective.py:TestNSGA2.test_opt_1 .\test_nsga2_multi_objective.py:TestNSGA2.test_opt_1 ... SKIP (00:00:0.00, 0 MB)
skip flaky NSGA2 tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This skips all tests on Windows, the below skips all multiobjective tests, so the only tests being run are the single-objective tests on linux.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand the idea (and that is what I was expecting) but that printout in my comment is from the Windows test log - apparently the single-objective test is running on Windows? Or is it a Testflo fluke?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is possible that the skipIf doesn't play nicely with parameterized. However this is actually what we want---the single objective test should pass on Windows and we should test it, while the multi-objective test appears to be flat out broken. Let me throw together a PR to update this.
Purpose
Closes #345. Also updated docs slightly + added an nsga2 test to the Rosenbrock problem.
Expected time until merged
1 week
Type of change
Testing
Checklist
flake8
andblack
to make sure the Python code adheres to PEP-8 and is consistently formattedfprettify
or C/C++ code withclang-format
as applicable