From 566f534b349b4e0f1854ef2c73d47e034ba5448d Mon Sep 17 00:00:00 2001 From: SoniEx2 Date: Wed, 27 Nov 2019 22:12:51 -0300 Subject: Tweaked key matching syntax --- testing/test_abdl.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'testing/test_abdl.py') diff --git a/testing/test_abdl.py b/testing/test_abdl.py index 9317643..080ab3f 100644 --- a/testing/test_abdl.py +++ b/testing/test_abdl.py @@ -11,6 +11,9 @@ import re import traceback + +abdl.DeprecationError.enable_key_match_compat = False + # use abdl's _pairs for consistency. pairs = abdl._pairs @@ -156,7 +159,7 @@ def test_multi_type_with_validation_errors(foo, pat): raise abdl.ValidationError assert all(LogAndCompare(pat.match(foo), deep(foo))) -@hypothesis.given(st.dictionaries(st.frozensets(st.text()), st.text()), st.just(abdl.compile("->(:?$sets->A)->D", {'sets': collections.abc.Set}))) +@hypothesis.given(st.dictionaries(st.frozensets(st.text()), st.text()), st.just(abdl.compile("->[:?$sets->A]->D", {'sets': collections.abc.Set}))) def test_subtree_partial(foo, pat): def deep(foo): for x in pairs(foo): -- cgit 1.4.1