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

test: Use insta for mermaid/dot render tests #137

Merged
merged 2 commits into from
Jun 24, 2024
Merged

Conversation

aborgna-q
Copy link
Collaborator

Moves the tests for both to a common module, an uses rstest::fixtures plus insta snapshots to test things.

Adds a hierarchy_interregional test case that shows the bug from CQCL/hugr#1197.

@aborgna-q aborgna-q requested a review from lmondada June 24, 2024 09:10
Copy link

codecov bot commented Jun 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.77%. Comparing base (4831264) to head (8e5eeb6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #137      +/-   ##
==========================================
- Coverage   80.21%   79.77%   -0.45%     
==========================================
  Files          21       21              
  Lines        5186     5043     -143     
  Branches     5186     5043     -143     
==========================================
- Hits         4160     4023     -137     
  Misses        949      949              
+ Partials       77       71       -6     

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

Copy link
Contributor

@lmondada lmondada left a comment

Choose a reason for hiding this comment

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

Yes, much cleaner! I am now using insta as well in portmatching 😅

@aborgna-q aborgna-q added this pull request to the merge queue Jun 24, 2024
Merged via the queue into main with commit b3c8142 Jun 24, 2024
11 checks passed
@aborgna-q aborgna-q deleted the ab/mermaid-tests branch June 24, 2024 10:34
@hugrbot hugrbot mentioned this pull request Jun 18, 2024
github-merge-queue bot pushed a commit that referenced this pull request Jul 5, 2024
## 🤖 New release
* `portgraph`: 0.12.1 -> 0.12.2

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

## [0.12.2](v0.12.1...v0.12.2)
- 2024-07-05

### Bug Fixes
- Intergraph edges in mermaid rendering
([#139](#139))

### New Features
- Add PortOffset::opposite
([#136](#136))
- Efficient LCA algorithm for the hierarchy
([#138](#138))

### Testing
- Use `insta` for mermaid/dot render tests
([#137](#137))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).
@hugrbot hugrbot mentioned this pull request Jul 25, 2024
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.

2 participants