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

Warnings in tests #22

Closed
MaceKuailv opened this issue May 20, 2023 · 3 comments
Closed

Warnings in tests #22

MaceKuailv opened this issue May 20, 2023 · 3 comments
Labels

Comments

@MaceKuailv
Copy link
Owner

Sometimes there is devide by zero warnings in the tests, which is as intended. I will take a closer look at all of them and silence them with care.

@MaceKuailv
Copy link
Owner Author

@malmans2 If the code is running correctly, there should be divide by zero warnings from place to place. Do you think it is acceptable to silence all of them in the tests?

@malmans2
Copy link
Contributor

malmans2 commented Jun 9, 2023

I would avoid it. You have a few of that warnings, but they are not that many.
Use assert as much as possible for warnings that you fully understand, filter the other warnings but not globally (e.g., use the decorator).

Assert is better because if you expect the warning but it won't show up in the future, you know that something is not right. And if you'll get the zero division warning in a function where you don't expect it, you'll notice right away.

@MaceKuailv
Copy link
Owner Author

close with #58

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

No branches or pull requests

2 participants