Skip to content
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

Please tell us the meaning of the sentence #386

Open
tkoyama010 opened this issue Aug 18, 2024 · 6 comments
Open

Please tell us the meaning of the sentence #386

tkoyama010 opened this issue Aug 18, 2024 · 6 comments
Labels
question Further information is requested

Comments

@tkoyama010
Copy link
Member

The with the input of both 0 and part is missing information and cannot be read. Please tell us what you are trying to convey.

- **Test special cases:** Sometimes there are special or outlier cases. For instance, if a function performs a specific calculation that may become problematic closer to the value = 0, test it with the input of both 0 and

@tkoyama010 tkoyama010 added the question Further information is requested label Aug 18, 2024
@sneakers-the-rat
Copy link
Contributor

I think it may have gotten blurred together with the example after it?

I think for the idea of testing special cases, one familiar example might be dividing by zero. Something like

Test special cases: Sometimes there are special or outlier cases. For instance, you may have some function that divides x / y: divide(x,y). Write a test for your function with y = 0 to ensure that it handles the special case correctly.

except i don't have my writing voice on right now and it could use a bit of @lwasser 's writing voice in it :)

@lwasser
Copy link
Member

lwasser commented Feb 13, 2025

Gosh - this specific line came from a review - possibly david or someone else. But i think Jonny has it right :)

We want to encourage people to think about edge cases where something might fail. so division by 0. I don't now if there is some calculation where as a number gets really small it could fail, ect. I think the take away is

"make sure that your tests consider edge cases".

and we could add another take away that would say

if you find a bug around an edge case, add a test that covers it!

i hope that helps @tkoyama010 !! i am not sure if you are still working on this or not. i'm just going through OLD notifications and also cleaning up issues and pr's that maybe can be closed!

@tkoyama010
Copy link
Member Author

@all-contributors please add @sneakers-the-rat and @lwasser for question

Copy link
Contributor

@tkoyama010

I've put up a pull request to add @sneakers-the-rat! 🎉

@tkoyama010
Copy link
Member Author

@all-contributors please add @lwasser for question

Copy link
Contributor

@tkoyama010

I've put up a pull request to add @lwasser! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants