← Back
Editing: test_decorators.cpython-311.pyc
� �@�cs � �` � d Z ddlZddlZddlmZ ddlmZ d� Zej d� � � Z ej � � d� � � Z ej d� � d � � � Z edd�� � Zd� Zd � Z G d� de� � Zd� Zej d� � � Zej d� � � Zej d� � � ZdS )z4Tests for the decorators we've created for IPython. � N)� decorators)�skip_doctestc �� � t j | � � r| }n+t j | � � r| j }nt d� � �t j |j � � \ }}}||||j fS )a� Get the names and default values of a function's arguments. A tuple of four things is returned: (args, varargs, varkw, defaults). 'args' is a list of the argument names (it may contain nested lists). 'varargs' and 'varkw' are the names of the * and ** arguments or None. 'defaults' is an n-tuple of the default values of the last n arguments. Modified version of inspect.getargspec from the Python Standard Library.zarg is not a Python function)�inspect� isfunction�ismethod�__func__� TypeError�getargs�__code__�__defaults__)�obj�func_obj�args�varargs�varkws �G/usr/lib/python3/dist-packages/IPython/testing/tests/test_decorators.py� getargspecr st � � ��#��� 8���� � �#� � � 8��<����6�7�7�7�"�?�8�+<�=�=��D�'�5���%��!6�6�6� c � � dS )zA trivial testN� r r r �trivialr ) s � � �Dr c � � ddz dS )z6A deliberately broken test - we want to skip this one.� r Nr r r r �test_deliberately_brokenr / � � � �a�C�C�C�Cr zTesting the skip decoratorc � � ddz dS )z<Another deliberately broken test - we want to skip this one.r r Nr r r r �test_deliberately_broken2r 4 r r r c �f � t d| � � t d|� � t d|� � dS )�AA function whose doctest we need to skip. >>> 1+1 3 zx:zy:zk:N)�print)�x�y�ks r �doctest_badr% <