Format: application/x-python-code
1 o
2
3 ��h� � @ s� d Z ddlZddlZddlmZ ddlmZ ddlm Z dd� Z
4 ejdd � �Ze�
5 � d
6 d� �Ze�
7 d�d
8 d� �Zed dd��Zdd� Zdd� ZG dd� de�Zdd� Zejdd� �Zejdd� �Zejdd� �ZdS )!z4Tests for the decorators we've created for IPython.
9 � N)�
10 decorators)�skip_doctest)�dedentc C sJ t �| �r| }n
11 t �| �r| j}ntd��t �|j�\}}}||||jfS )a� Get the names and default values of a function's arguments.
12
13 A tuple of four things is returned: (args, varargs, varkw, defaults).
14 'args' is a list of the argument names (it may contain nested lists).
15 'varargs' and 'varkw' are the names of the * and ** arguments or None.
16 'defaults' is an n-tuple of the default values of the last n arguments.
17
18 Modified version of inspect.getargspec from the Python Standard
19 Library.zarg is not a Python function)�inspect�
20 isfunction�ismethod�__func__� TypeError�getargs�__code__�__defaults__)�objZfunc_obj�args�varargs�varkw� r �[c:\Users\shubh\Videos\agent\nova\Lib\site-packages\IPython/testing/tests/test_decorators.py�
21 getargspec s
22
23 r c C � dS )zA trivial testNr r r r r �trivial* s r c C � dd dS )z6A deliberately broken test - we want to skip this one.� r Nr r r r r �test_deliberately_broken0 � r zTesting the skip decoratorc C r )z<Another deliberately broken test - we want to skip this one.r r Nr r r r r �test_deliberately_broken25 r r r c K s"