�
���_� � � � d dl Z d dlmZmZmZ d dlmZmZmZm Z m
Z
mZ d dlm
Z
G d� de j � � Zedk r e j � � dS dS )� N)�is_instance�X� SomeClass)�Mock� MagicMock�NonCallableMagicMock�NonCallableMock�patch�create_autospec)�
CallableMixinc �V � e Zd Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z d� Z
d � Zd
� Zd� Z
d� Zd
S )�TestCallablec � � | � t |t � � � � | � t |t � � � � d S �N)�
assertTruer r �assertFalser ��self�mocks �9/usr/lib/python3/dist-packages/mock/tests/testcallable.py�assertNotCallablezTestCallable.assertNotCallable sC � �����D�*>�?�?�@�@�@�����T�=�9�9�:�:�:�:�:� c � � t � � t � � fD ]m}| � t |� � | � t |d� � � � | � |j j t |� � � � �nd S )N�__call__)
r r �assertRaises� TypeErrorr �hasattr�assertIn� __class__�__name__�reprr s r �test_non_callablezTestCallable.test_non_callable s� � �(�*�*�O�,=�,=�=� ?� ?�D����i��.�.�.����W�T�:�6�6�7�7�7��M�M�$�.�1�4��:�:�>�>�>�>� ?� ?r c � � | � t t t � � � � | � t t t
� � � � d S r )r �
issubclassr r r r �r s r �test_hierarchyzTestCallable.test_hierarchy sA � ����
�9�d�3�3�4�4�4����
�#7��I�I�J�J�J�J�Jr c �& � t � � }| � t t |j � � t
� � � � t
� � }| � t t |j � � t � � � � d S r ) r r r$ �type�oner r �twor )r r) r* s r �test_attributeszTestCallable.test_attributes" |