← Back
Editing: base_description.cpython-38.pyc
U �b�V � @ sh d dl mZ dZdZdZd dlZd dlZd dlmZ d dl m Z d dlmZ G d d � d e�Z dd� ZdS ) � )�absolute_importzJon ReidzCopyright 2011 hamcrest.orgzBSD, see License.txtN)�Description)�SelfDescribingValue)� hasmethodc @ sH e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dd� Z dS )�BaseDescriptionz`Base class for all :py:class:`~hamcrest.core.description.Description` implementations. c C s | � |� | S )N)�append)�self�text� r �@/usr/lib/python3/dist-packages/hamcrest/core/base_description.py�append_text s zBaseDescription.append_textc C s� t |d�r|�| � n�tjr8t|tj�r8| �t|�� n�tjrVt|tj �rV| � |� njt|tj�rn| � |� nRt|�}|d d� dkr�|dd � dkr�| �|� n| �d� | �|� | �d� | S )N�describe_to� �<����>)r r �sixZPY3� isinstanceZ text_typer �reprZPY2Zbinary_type�append_string_in_python_syntax�str)r �valueZdescriptionr r r �append_description_of s z%BaseDescription.append_description_ofc C sH t �dt� t|t�r"| �|� n"| �d� | �t|�� | �d� | S )Nz2Call append_description_of instead of append_valuer r )�warnings�warn�DeprecationWarningr r r r )r r r r r �append_value* s � zBaseDescription.append_valuec C s"