Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/jsonschema/tests/__pycache__/ |
Upload File : |
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"