Skip to content

Commit

Permalink
Update test_language.py
Browse files Browse the repository at this point in the history
  • Loading branch information
glorialeezero committed Dec 6, 2024
1 parent 0b24b30 commit d22aabe
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/test_language.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from qupsy.language import GateCmd, HoleCmd, Integer, Mul, Pgm, Ry, SeqCmd
from qupsy.language import Div, GateCmd, HoleCmd, Integer, Mul, Pgm, Ry, SeqCmd


def test_pgm_create_with_empty_body():
Expand Down Expand Up @@ -31,3 +31,9 @@ def test_pgm_call():
pgm = Mul(Integer(2), Integer(3))
res = pgm.__call__({"n": 5})
assert res == 6


def test_pgm_children():
pgm = Div(Integer(2), Integer(3))
children = pgm.children
assert children == [Integer(2), Integer(3)]

0 comments on commit d22aabe

Please sign in to comment.