Allow special marker ANY inside JSON examples

This commit is contained in:
Roberto Abdelkader Martínez Pérez
2019-08-21 13:01:56 +02:00
parent c96584efcc
commit 2ec064a933
3 changed files with 32 additions and 1 deletions
+6
View File
@@ -1,4 +1,5 @@
from functools import singledispatch
from jsonexample import ANY
def assert_same_type(f):
@@ -40,3 +41,8 @@ def _(model, obj):
@assert_same_type
def _(model, obj):
return model <= obj
@is_subset.register(ANY)
def _(model, obj):
return True