B pSe! @s.dZddlZddlZddlmZmZmZmZmZm Z m Z m Z ddl m Z ddlmZddlmZmZeZejddZejd dZejd dZejd dZd d ZddZejdkZerdZddZnddZeje ej!ddej!ddej!ddeedddZ"eje ej!ddej!ddej!ddee dddZ#eje ej!ddej!ddej!ddee dddZ$eje e%ej!ddej!ddej!ddee dddZ&e'he(de)ejd d!ej*d"dDd#eej+ej,ed$d%Z-ejej*d"dd&eej+ej,ed$d%Z.WdQRXdS)'z Test runner for the JSON Schema official test suite Tests comprehensive correctness of each draft's validator. See https://github.com/json-schema-org/JSON-Schema-Test-Suite for details. N)Draft3ValidatorDraft4ValidatorDraft6ValidatorDraft7Validatordraft3_format_checkerdraft4_format_checkerdraft6_format_checkerdraft7_format_checker)bug)Suite)_DEPRECATED_DEFAULT_TYPEScreateZdraft3)nameZdraft4Zdraft6Zdraft7c sfdd}|S)Ncs"tfddDrSdS)Nc3s |]\}}|t|kVqdS)N)getattr).0attrvalue)test\/opt/alt/python37/lib/python3.7/site-packages/jsonschema/tests/test_jsonschema_test_suite.py $sz(skip..skipper..)allitems)r)kwargsmessage)rrskipper#szskip..skipperr)rrrr)rrrskip"srcsfdd}|S)NcsB|j}|dks|dksd|kr"dS|djkr>d|dSdS)NTFformatzFormat checker {0!r} not found.)schemaZcheckersr)rr)checkerrrmissing_format*s z&missing_format..missing_formatr)rr r)rrr )s r iz:Not running surrogate Unicode case, this Python is narrow.cCs ttdd|pttdd|S)Nz7one supplementary Unicode code point is not long enough)r descriptionz4two supplementary Unicode code points is long enough)rr)rrrrnarrow_unicode_build8sr"cCsdS)Nr)rrrrr"AsZbignumrZzeroTerminatedFloatscCs&t|p$tt|p$tdddd|S)NzUpstream bug in strict_rfc3339rzcase-insensitive T and Z)rsubjectr!)r"r rr)rrrrLs r$) ValidatorZformat_checkerrcCst|ptt|pttddd|pttdddd|pttdddd|pttdddd|pttdd d|ptd d d d |S)Nrefz$Recursive references between schemas)rr#case_descriptioniszLocation-independent identifierz1Location-independent identifier with absolute URIzALocation-independent identifier with base URI change in subschema refRemotez,base URI change - change folder in subschemazUpstream bug in strict_rfc3339rzcase-insensitive T and Z)rr#r!)r"r rrr )rrrrr$_s@ cCst|ptt|pttddd|pttdddd|pttdddd|pttdddd|pttdd d|ptd d d d |S)Nr&z$Recursive references between schemas)rr#r'iszLocation-independent identifierz1Location-independent identifier with absolute URIzALocation-independent identifier with base URI change in subschemar(z,base URI change - change folder in subschemazUpstream bug in strict_rfc3339rzcase-insensitive T and Z)rr#r!)r"r rrr )rrrrr$s@ contentcCst|ptt|pttddd|pttdddd|pttdddd|pttdddd|pttdd d|ptd d d d |pttdddd|pttdddd|pttdddd|S)Nr&z$Recursive references between schemas)rr#r'iszLocation-independent identifierz1Location-independent identifier with absolute URIzALocation-independent identifier with base URI change in subschemar(z,base URI change - change folder in subschemazUpstream bug in strict_rfc3339z date-timezcase-insensitive T and Z)rr#r!iQr)z8validation of string-encoded content based on media typez$validation of binary string-encodingz1validation of binary-encoded media type documents)r"r r rr )rrrrr$s^ ignoreccs|]}dd|DVqdS)css |]}|jddikr|VqdS)typeanyN)r)rrrrrrsz.Nr)rZeachrrrrsrr+TestDraft3LegacyTypeCheck)Z meta_schemaZ validatorsZ default_types)rr%TestDraft4LegacyTypeCheck)/__doc__syswarningsZ jsonschemarrrrrrrr Zjsonschema.tests._helpersr Zjsonschema.tests._suiter Zjsonschema.validatorsr r ZSUITEversionZDRAFT3ZDRAFT4ZDRAFT6ZDRAFT7rr maxunicodeZis_narrow_buildrr"Zto_unittest_testcasetestsZoptional_tests_ofZ TestDraft3Z TestDraft4Z TestDraft6Z format_testsZ TestDraft7catch_warnings simplefilterDeprecationWarningZtests_ofZ META_SCHEMAZ VALIDATORSr-r.rrrrs(                )    )    <