We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This test fails. (I just added the repeated validation to test_discard.
test_discard
def test_discard(validate): @guppy def discard(x: int) -> None: return validate(discard) validate(discard)
Running pytest -v throws out this error.
pytest -v
validate = <function validate.<locals>.validate_impl at 0x7fddf2cf71a0> def test_discard(validate): @guppy def discard(x: int) -> None: return validate(discard) > validate(discard) tests/integration/test_basic.py:36: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/conftest.py:17: in validate_impl bs = hugr.serialize() guppy/hugr/hugr.py:773: in serialize return self.to_raw().packb() guppy/hugr/hugr.py:708: in to_raw self.insert_order_edges() guppy/hugr/hugr.py:688: in insert_order_edges if all( guppy/hugr/hugr.py:689: in <genexpr> next(self.out_edges(p), None) is None for p in n.out_ports guppy/hugr/hugr.py:623: in out_edges src, tgt = self._to_edge(*e) guppy/hugr/hugr.py:644: in _to_edge return src_node.out_port(key[0]), tgt_node.in_port(key[1]) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = VNode(idx=6, op=MakeTuple(parent=1, input_extensions=[], op='LeafOp', lop='MakeTuple', tys=[]), parent=BlockNode(idx=4...types=[]), meta_data={}), meta_data={}, in_port_types=[], out_port_types=[TupleType(element_types=[], preserve=False)]) offset = -1 def in_port(self, offset: PortOffset | None) -> InPortV: """Returns the input port at the given offset.""" assert offset is not None assert offset < self.num_in_ports > return InPortV(self, offset, self.in_port_types[offset]) E IndexError: list index out of range guppy/hugr/hugr.py:157: IndexError
This is the only tests that fails if we call hugr.serialize() twice in a row.
hugr.serialize()
The text was updated successfully, but these errors were encountered:
in_port
out_port
aborgna-q
Successfully merging a pull request may close this issue.
This test fails. (I just added the repeated validation to
test_discard
.Running
pytest -v
throws out this error.This is the only tests that fails if we call
hugr.serialize()
twice in a row.The text was updated successfully, but these errors were encountered: