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

Add tests for qtpy sub-module #64

Merged
merged 4 commits into from
Apr 8, 2024
Merged

Add tests for qtpy sub-module #64

merged 4 commits into from
Apr 8, 2024

Conversation

K-Meech
Copy link
Contributor

@K-Meech K-Meech commented Apr 4, 2024

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
The coverage of the qtpy sub-module is currently only 73%

What does this PR do?
Increases test coverage on the qtpy sub-module to >90%. Also expands some type hints / docstrings so functions are consistent with each other.

References

Closes #63

How has this PR been tested?

All tests pass locally.

Is this a breaking change?

No

Does this PR require an update to the documentation?

No

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality (unit & integration)
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

@K-Meech K-Meech requested a review from a team April 4, 2024 15:28
Copy link

codecov bot commented Apr 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.15%. Comparing base (cacefd6) to head (65df12a).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #64      +/-   ##
==========================================
+ Coverage   86.49%   89.15%   +2.65%     
==========================================
  Files          35       35              
  Lines        1355     1355              
==========================================
+ Hits         1172     1208      +36     
+ Misses        183      147      -36     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@alessandrofelder alessandrofelder left a comment

Choose a reason for hiding this comment

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

Looking good - one tiny comment - thank you!


def test_add_int_box(qtbot, box):
"""
Smoke tests for add_float_box for all conditional branches
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Smoke tests for add_float_box for all conditional branches
Smoke tests for add_int_box for all conditional branches

Could you clarify what "all conditional branches" means in each of the tests in this file by updating the docstrings?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated the docstrings to make it clearer what each of these tests do. Feel free to merge if you're happy with it!

@alessandrofelder alessandrofelder merged commit 416069a into main Apr 8, 2024
12 checks passed
@alessandrofelder alessandrofelder deleted the qtpy_tests branch April 8, 2024 08:32
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.

Create tests for qtpy sub-module
2 participants