Skip to content

Match error message in function graph tests #108

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

Merged
merged 1 commit into from
Dec 12, 2022
Merged

Conversation

ferrine
Copy link
Member

@ferrine ferrine commented Dec 12, 2022

Motivation for these changes

Function graph tests did not have clear error messages to check

Implementation details

Added match=... to existing pytest.raises

Checklist

Major / Breaking Changes

  • ...

Bugfixes / New features

  • ...

Docs / Maintenance

  • ...

FunctionGraph(var1, [var2])

with pytest.raises(TypeError):
with pytest.raises(TypeError, match="'Variable' object is not reversible"):
Copy link
Member Author

Choose a reason for hiding this comment

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

This one end the above error message is slightly not clear to me. It did not refer to inputs or outputs

Copy link
Member

Choose a reason for hiding this comment

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

Feel free to improve the error message

@ricardoV94 ricardoV94 changed the title improve error message in function graph tests Match error message in function graph tests Dec 12, 2022
@codecov-commenter
Copy link

codecov-commenter commented Dec 12, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.41%. Comparing base (039ed1c) to head (1aaf971).
Report is 823 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #108      +/-   ##
==========================================
+ Coverage   74.32%   74.41%   +0.08%     
==========================================
  Files         177      179       +2     
  Lines       49078    49249     +171     
  Branches    10416    10422       +6     
==========================================
+ Hits        36479    36649     +170     
- Misses      10293    10295       +2     
+ Partials     2306     2305       -1     

see 8 files with indirect coverage changes

@ferrine ferrine merged commit 16d1cbe into main Dec 12, 2022
@ferrine ferrine deleted the improve-test-fg branch December 12, 2022 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants