Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
tandav committed Sep 17, 2023
1 parent cfe542a commit 638b57d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/constraints_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
from opseq.generators import AppendOp
from opseq import constraints as constraints_


def is_even(x: int) -> bool:
return x % 2 == 0

def identity(x):
return x

Expand Down Expand Up @@ -126,10 +130,6 @@ def test_lookback_constraint_loop3():
assert even_odd_interchange(prev, curr)


def is_even(x: int) -> bool:
return x % 2 == 0


def test_len_constraint():
opseq = OpSeq(4, generator=AppendOp([0, 1, 2]), constraints=constraints_.LenConstraint.from_dict({0: is_even}))
assert all(is_even(seq[0]) for seq in opseq)
Expand Down

0 comments on commit 638b57d

Please sign in to comment.