Chore/replace xfails #19
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request updates the test suite to improve its robustness and clarity by replacing the use of
pytest.xfailin exception handling with more explicit assertions, and by modernizing import and parameter usage in utility tests. The changes make the tests stricter and more idiomatic, ensuring that expected failures are handled usingpytest.raisesor by simply passing, rather than marking them as expected failures.Test robustness and exception handling improvements:
pytest.xfailwithpytest.raises(NotImplementedError)in tests for unimplementedfitandpredictmethods intest_estimators.py,test_extratrees.py,test_gradientboostedtrees.py, andtest_randomforest.py, making the tests fail if the error is not raised as expected. [1] [2] [3] [4]test_split.py,test_split_objects.py,test_node.py, andtest_scoring.py) to replacepytest.xfailwithpassin branches where errors are expected, ensuring tests only fail when the error is not raised. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20]Utility test modernization:
tests/test_utils.pyto use direct imports of parameter classes and enums, improved parameterization, and replacedpytest.xfailwith direct assertions orpassstatements for failed initializations, making the tests clearer and more maintainable. [1] [2]