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

Assert tests #310

Merged
merged 6 commits into from
Apr 13, 2023
Merged

Assert tests #310

merged 6 commits into from
Apr 13, 2023

Conversation

jcapriot
Copy link
Member

Changes check_derivative function to use assertions instead of returning True or False if the test passed or failed.
Will now raise an AssertionError if the tests fails, or return True if the test passed.

Also adds an assert_expected_order test function that doesn't use the OrderTest class. This is simpler to use with pytests's parameterized tests.

assert that a derivative test passed (instead of returning true or false). This plays better with pytest
Altenative use that will play nicely with pytest parameterized tests.
@codecov
Copy link

codecov bot commented Apr 1, 2023

Codecov Report

Merging #310 (c3c2a54) into main (d5a27bf) will increase coverage by 0.02%.
The diff coverage is 81.53%.

@@            Coverage Diff             @@
##             main     #310      +/-   ##
==========================================
+ Coverage   85.22%   85.24%   +0.02%     
==========================================
  Files          38       38              
  Lines       11284    11301      +17     
==========================================
+ Hits         9617     9634      +17     
  Misses       1667     1667              
Impacted Files Coverage Δ
discretize/tests.py 80.45% <81.53%> (+1.33%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@jcapriot jcapriot merged commit 53002e1 into simpeg:main Apr 13, 2023
@jcapriot jcapriot deleted the assert_tests branch April 13, 2023 19:38
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.

1 participant