관리-도구
편집 파일: test_exceptions.cpython-37.opt-1.pyc
B �pSe�; � @ s� d dl mZ d dlZd dlmZmZ d dlmZ G dd� de�ZG dd� de�Z G d d � d e�Z G dd� de�ZG d d� de�ZdS )� )�TestCaseN)�Draft4Validator� exceptions)�PY3c @ sT e Zd Zdd� Zdd� Zdd� Zdd� Zd d � Zdd� Zd d� Z dd� Z dd� ZdS )� TestBestMatchc C sH t |�}t�|�}t�t|��}d}| j|�� |�� |�||�d� |S )Nz:Didn't return a consistent best match! Got: {0} Then: {1})�msg)�listr � best_match�reversed�assertEqualZ _contents�format)�self�errors�bestZ reversed_bestr � r �Q/opt/alt/python37/lib/python3.7/site-packages/jsonschema/tests/test_exceptions.pyr s zTestBestMatch.best_matchc C sH t ddddddiid�ii�}| �|�ddg ii��}| �|jd� d S ) N� properties�foo� �bar�type�object)� minPropertiesr r )r r �iter_errorsr � validator)r r r r r r �(test_shallower_errors_are_better_matches s z6TestBestMatch.test_shallower_errors_are_better_matchesc C sJ t dddiddigddiddigd��}| �|�i ��}| �|jd� dS )zn A property you *must* match is probably better than one you have to match a part of. r r �stringZnumber)r �anyOf�oneOfr N)r r r r r )r r r r r r �%test_oneOf_and_anyOf_are_weak_matches"