Skip to content

Added Testcases to scoring_functions.py #1299

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

Closed
wants to merge 3 commits into from
Closed

Added Testcases to scoring_functions.py #1299

wants to merge 3 commits into from

Conversation

cozek
Copy link
Member

@cozek cozek commented Oct 7, 2019

This PR is in response to #1085 asking for doctests. I have added doctests to all functions in
scoring_functions.py

@cclauss
Copy link
Member

cclauss commented Oct 7, 2019

Conflicting files and failing tests.

def bisection(function, a, b): # finds where the function becomes 0 in [a,b] using bolzano
def bisection(
function, a, b
): # finds where the function becomes 0 in [a,b] using bolzano
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please convert this comment to a docstring.

elif function(a) * function(b) > 0: # if none of these are root and they are both positive or negative,
elif (
function(a) * function(b) > 0
): # if none of these are root and they are both positive or negative,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put this comment on a separate line.


def intersection(
function, x0, x1
): # function is the f we want to find its root and x0 and x1 are two random starting points
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please convert this comment to a docstring.

@cozek cozek requested a review from cclauss October 7, 2019 18:46
@cozek
Copy link
Member Author

cozek commented Oct 7, 2019

This PR is insane. Something is wrong. I only changed 1 file. What the frick!?

@cozek
Copy link
Member Author

cozek commented Oct 7, 2019

Closing this.

@cozek cozek closed this Oct 7, 2019
@cozek cozek deleted the scoring branch October 7, 2019 18:48
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