The function for summary_cv is complete and all tests in test_summary.py run smoothly.
There is a separate test_summary.py file just like the test_cv.py file besides test_all.py.
The reason why test_all was not running earlier was because of some mistakes both me and Shun have done in multiple parts in our test files.
In the test files we should just write raise(TypeError) and no string for the explanation of the error. This explanation will be written in the function definition.
Example
The code below is wrong for the test file.
def test_input_contains_over_1():
with pytest.raises(ValueError('Elements of `scores` must be between 0 and 1')):
summary_cv(scores = [0.96, 0.97, 1.98])
Correct version:
def test_input_contains_over_1():
with pytest.raises(ValueError):
summary_cv(scores = [0.96, 0.97, 1.98])
The corresponding error detection in function definition would be:
if not all(item <= 1 for item in scores):
raise ValueError('Elements of `scores` must be between 0 and 1')
I corrected this mistake for summary_cv tests but I did not want to delete the error explanations in train_test_split as I thought that Shun would be using these while writing the function definition. I wanted to describe the situation because I saw that the majority of the errors were due to this mistake.
Here are my updates:
summary_cv
is complete and all tests intest_summary.py
run smoothly.test_summary.py
file just like thetest_cv.py
file besidestest_all.py
.test_all
was not running earlier was because of some mistakes both me and Shun have done in multiple parts in our test files.raise(TypeError)
and no string for the explanation of the error. This explanation will be written in the function definition.Example
The code below is wrong for the test file.
Correct version:
The corresponding error detection in function definition would be:
I corrected this mistake for
summary_cv
tests but I did not want to delete the error explanations intrain_test_split
as I thought that Shun would be using these while writing the function definition. I wanted to describe the situation because I saw that the majority of the errors were due to this mistake.