Skip to content

Commit

Permalink
test: add test for capture of deferred and builder
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Aug 6, 2024
1 parent cdd0ebf commit ab55372
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions koerce/tests/test_patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,10 +520,10 @@ def test_capture():
assert ctx == {"result": 12}


def test_capture_with_deferred():
@pytest.mark.parametrize("x", [Deferred(Variable("x")), Variable("x")])
def test_capture_with_deferred_and_builder(x):
ctx = {}

x = Deferred(Variable("x"))
p = Capture(x, InstanceOf(float))

assert p.apply(1, context=ctx) is NoMatch
Expand Down

0 comments on commit ab55372

Please sign in to comment.