관리-도구
편집 파일: test_speedups.cpython-37.pyc
B VX�Y" � @ s� d dl mZ d dlZd dlZd dlmZ d dlZd dlmZmZmZ d dl m Z mZmZ dd� Z dd � ZG d d� d�ZG dd � d e�ZG dd� de�ZdS )� )�with_statementN)�TestCase)�encoder�decoder�scanner)�PY3� long_type�bc C s t jd k S )N)r �c_make_encoder� r r �Q/opt/alt/python37/lib64/python3.7/site-packages/simplejson/tests/test_speedups.py�has_speedups s r c s � fdd�}|S )Nc s6 t � s,ttd�rt�d��ntj�d� d S � | |�S )N�SkipTestzC Extension not available)r �hasattr�unittestr �sys�stdout�write)�args�kwargs)�funcr r �wrapper s z)skip_if_speedups_missing.<locals>.wrapperr )r r r )r r �skip_if_speedups_missing s r c @ s e Zd Zdd� ZeZdS )�BadBoolc C s dd d S )N� r r )�selfr r r �__bool__ s zBadBool.__bool__N)�__name__� __module__�__qualname__r �__nonzero__r r r r r s r c @ s$ e Zd Zedd� �Zedd� �ZdS )� TestDecodec C s | � ttjd� d S )Nr )�assertRaises�AttributeErrorr �c_make_scanner)r r r r �test_make_scanner$ s zTestDecode.test_make_scannerc C sH dd� }| � t|d� | � t|d� tsD| � t|d� | � t|d� d S )Nc S s t jt� d��| � d S )N)�strict)r �JSONDecoderr �decode)�valuer r r �test* s z+TestDecode.test_bad_bool_args.<locals>.testz""z{})r"