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

misc: fix tests that secretly rely on optional dependencies #3361

Merged
merged 4 commits into from
Nov 2, 2024

Conversation

superlopuh
Copy link
Member

Also changes CI-Core to test only the core dev dependencies, letting CI-MLIR check the full coverage

@superlopuh superlopuh added the misc Miscellaneous label Oct 30, 2024
@superlopuh superlopuh self-assigned this Oct 30, 2024
@superlopuh superlopuh marked this pull request as ready for review October 30, 2024 16:44
@superlopuh superlopuh requested a review from alexarice November 2, 2024 17:03
Copy link
Collaborator

@math-fehr math-fehr left a comment

Choose a reason for hiding this comment

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

👍

Comment on lines 30 to 37
# Mock pyclip_copy for testing
_copied_text: str | None = None


def pyclip_copy(text: str) -> None:
"""Mock version of pyclip_copy that stores copied text for inspection during tests"""
global _copied_text
_copied_text = text
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why was that necessary?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because pyclip is also an optional dependency, and it would be nice to actually test what the button copies, even if we don't right now. I could add this quickly

Copy link
Member Author

Choose a reason for hiding this comment

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

I actually couldn't get this to work, and added a different API instead.

Copy link

codecov bot commented Nov 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.12%. Comparing base (da9cbfa) to head (7317137).
Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3361      +/-   ##
==========================================
+ Coverage   90.09%   90.12%   +0.02%     
==========================================
  Files         447      450       +3     
  Lines       56578    56809     +231     
  Branches     5431     5460      +29     
==========================================
+ Hits        50975    51197     +222     
- Misses       4166     4167       +1     
- Partials     1437     1445       +8     

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

@superlopuh superlopuh merged commit 0a01bf4 into main Nov 2, 2024
14 checks passed
@superlopuh superlopuh deleted the sasha/misc/tests-no-deps branch November 2, 2024 18:25
EdmundGoodman pushed a commit to EdmundGoodman/xdsl that referenced this pull request Dec 6, 2024
…ect#3361)

Also changes CI-Core to test only the core dev dependencies, letting
CI-MLIR check the full coverage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
misc Miscellaneous
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants