Пример #1
0
    ),
)


TestDraft4 = DRAFT4.to_unittest_testcase(
    DRAFT4.tests(),
    DRAFT4.optional_tests_of(name="bignum"),
    DRAFT4.optional_tests_of(name="format"),
    DRAFT4.optional_tests_of(name="zeroTerminatedFloats"),
    Validator=Draft4Validator,
    format_checker=draft4_format_checker,
    skip=lambda test: (
        narrow_unicode_build(test)
        or missing_format(draft4_format_checker)(test)
        or skip(
            message=bug(),
            subject="ref",
            case_description="Recursive references between schemas",
        )(test)
        or skip(
            message=bug(371),
            subject="ref",
            case_description="Location-independent identifier",
        )(test)
        or skip(
            message=bug(371),
            subject="ref",
            case_description=(
                "Location-independent identifier with absolute URI"
            ),
        )(test)
Пример #2
0
    def narrow_unicode_build(test):  # pragma: no cover
        return


TestDraft3 = DRAFT3.to_unittest_testcase(
    DRAFT3.tests(),
    DRAFT3.format_tests(),
    DRAFT3.optional_tests_of(name="bignum"),
    DRAFT3.optional_tests_of(name="non-bmp-regex"),
    DRAFT3.optional_tests_of(name="zeroTerminatedFloats"),
    Validator=Draft3Validator,
    format_checker=draft3_format_checker,
    skip=lambda test:
    (narrow_unicode_build(test) or missing_format(draft3_format_checker)
     (test) or complex_email_validation(test) or skip(
         message=bug(685),
         subject="date",
         description="invalidates non-padded month dates",
     )(test) or skip(
         message=bug(685),
         subject="date",
         description="invalidates non-padded day dates",
     )(test) or skip(
         message="Upstream bug in strict_rfc3339",
         subject="date-time",
         description="case-insensitive T and Z",
     )(test) or skip(
         message=bug(686),
         subject="uniqueItems",
         description="[0] and [false] are unique",
     )(test) or skip(