From ab5537289371b44c0b854004f81d9eaca24f6110 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Tue, 6 Aug 2024 12:19:45 -0400 Subject: [PATCH] test: add test for capture of deferred and builder --- koerce/tests/test_patterns.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koerce/tests/test_patterns.py b/koerce/tests/test_patterns.py index 80d343a..9bcf3a7 100644 --- a/koerce/tests/test_patterns.py +++ b/koerce/tests/test_patterns.py @@ -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