File: //usr/lib/python3/dist-packages/jsonschema/tests/__pycache__/test_exceptions.cpython-310.pyc
o
>��]�; � @ 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 @ �T 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�assertEqual� _contents�format)�self�errors�best�
reversed_bestr � r �B/usr/lib/python3/dist-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 �string�number)r �anyOf�oneOfr Nr r r r r �%test_oneOf_and_anyOf_are_weak_matches"