Skip to content

Commit

Permalink
docs: add hugr.py
Browse files Browse the repository at this point in the history
add namespace in  conftest.oy to allow `Dfg` use in HUGR doctests
  • Loading branch information
ss2165 committed Jun 28, 2024
1 parent 5b22902 commit f891beb
Show file tree
Hide file tree
Showing 2 changed files with 284 additions and 7 deletions.
21 changes: 21 additions & 0 deletions hugr-py/src/hugr/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import pytest
import hugr.hugr as hugr
import hugr.node_port as node_port
import hugr.dfg as dfg
import hugr.ops as ops
import hugr.tys as tys
import hugr.val as val


@pytest.fixture(autouse=True)
def add_np(doctest_namespace):
doctest_namespace.update(
{
"hugr": hugr,
"node_port": node_port,
"dfg": dfg,
"ops": ops,
"tys": tys,
"val": val,
}
)
Loading

0 comments on commit f891beb

Please sign in to comment.