-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/cargo/itertools-0.13.0
- Loading branch information
Showing
8 changed files
with
79 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
def test_it_works(): | ||
"""TODO: Replace this with a real test.""" | ||
assert 2 + 2 != "🐟" | ||
from hugr.serialization import SerialHugr | ||
|
||
|
||
def test_empty(): | ||
h = SerialHugr(nodes=[], edges=[]) | ||
assert h.model_dump() == { | ||
"version": "v1", | ||
"nodes": [], | ||
"edges": [], | ||
"metadata": None, | ||
"encoder": None, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# from https://github.com/python-poetry/poetry/issues/144#issuecomment-877835259 | ||
import toml # type: ignore[import-untyped] | ||
from pathlib import Path | ||
import hugr | ||
|
||
|
||
def test_versions_are_in_sync(): | ||
"""Checks if the pyproject.toml and package.__init__.py __version__ are in sync.""" | ||
|
||
path = Path(__file__).resolve().parents[1] / "pyproject.toml" | ||
pyproject = toml.loads(open(str(path)).read()) | ||
pyproject_version = pyproject["tool"]["poetry"]["version"] | ||
|
||
package_init_version = hugr.__version__ | ||
|
||
assert package_init_version == pyproject_version |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters