summary refs log tree commit diff stats
path: root/testing/test_abdl.py
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2019-12-03 23:21:03 -0300
committerSoniEx2 <endermoneymod@gmail.com>2019-12-03 23:21:03 -0300
commit50fd9418f9dcb3a9ae609582b913decddcd84c93 (patch)
tree94f19e4497bb2611f64204fe2e96c18b3c10111e /testing/test_abdl.py
parent4387ebf8e3721164bc6144067495a03e35c292da (diff)
Add multiple value matches
Diffstat (limited to 'testing/test_abdl.py')
-rw-r--r--testing/test_abdl.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/testing/test_abdl.py b/testing/test_abdl.py
index 080ab3f..4f5241f 100644
--- a/testing/test_abdl.py
+++ b/testing/test_abdl.py
@@ -182,6 +182,10 @@ def test_param(foo, pat):
                     yield {"X": x, "Z": z}
     assert all(LogAndCompare(pat.match(foo), deep(foo)))
 
+def test_basic_value_subtree():
+    matcher = abdl.match("(->foo'foo')(->bar'bar')", {'foo': 1, 'bar': 2})
+    assert list(matcher) == [{'foo': ('foo', 1), 'bar': ('bar', 2)}]
+
 # FIXME
 #@hypothesis.given(objtree, st.text())
 #def test_exhaustive(foo, pat):