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

Mazygio/tests/utils #66

Merged
merged 22 commits into from
Dec 7, 2022
Merged

Mazygio/tests/utils #66

merged 22 commits into from
Dec 7, 2022

Conversation

MazyGio
Copy link
Contributor

@MazyGio MazyGio commented Dec 1, 2022

Added tests for utils/price.py and utils/parse_config.py
Cleaned up comments in utils/price.py
Added tests for utils/price.py
Cleaned up comments in utils/time.py
Added tests for utils/time.py

TODO: add tests for outputs.py and data.py

Copy link
Contributor

@sentilesdal sentilesdal left a comment

Choose a reason for hiding this comment

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

This code is SO clean. Nice work Mazy. I left some comments about testing unhappy paths, which are arguably more important to test than the happy paths. Its crucial to know when and how a method will break. This isn't as important for the simpler utils like in time.py, but a good rule of thumb is that you want to test any asserts/exceptions you see in the function. also try to test things that don't make sense so we can see how it fails and verify to ourselves that the failure is graceful or breaks in a predictable/desired manner.

tests/utils/test_price_utils.py Show resolved Hide resolved
tests/utils/test_price_utils.py Show resolved Hide resolved
tests/utils/test_price_utils.py Show resolved Hide resolved
tests/utils/test_price_utils.py Show resolved Hide resolved
tests/utils/test_time_utils.py Show resolved Hide resolved
@MazyGio MazyGio force-pushed the mazygio/tests/utils branch 2 times, most recently from 9777ef7 to a51a51b Compare December 5, 2022 16:50
Copy link
Contributor

@sentilesdal sentilesdal left a comment

Choose a reason for hiding this comment

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

these look great, thanks for adding error tests!

@MazyGio MazyGio merged commit f4e3201 into main Dec 7, 2022
@MazyGio MazyGio deleted the mazygio/tests/utils branch December 7, 2022 19:10
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.

3 participants