Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/IPython/testing/__pycache__/decorators.cpython-39.pyc
Ðазад
a o�hy � @ sl d Z ddlZddlZddlZddlZddlZddlmZ ddlmZ ddl m Z mZ dd� Zd)d d �Z d*dd�Zd d� Zdd� Ze ejdkd�Ze ej�d�d�Ze ejdkd�Ze ejdkd�Ze ej�d� d�Zejdvo�ej�dd�dkZdZe ee�Zdd� Zed�Zed �Zd!d� Z zej!d"d#�Z"W n e#�yH d$Z$Y n0 d%Z$e"�%� ee$d&�Z&d'd(� Z'dS )+a Decorators for labeling test objects. Decorators that merely return a modified version of the original function object are straightforward. Decorators that return a new function object need to use nose.tools.make_decorator(original_function)(decorator) in returning the decorator, in order to preserve metadata such as function name, setup and teardown functions and so on - see nose.tools for more information. This module provides a set of useful decorators meant to be ready to use in your own tests. See the bottom of the file for the ready-made ones, and if you find yourself writing a new one that may be of generic use, add it here. Included decorators: Lightweight testing that remains unittest-compatible. - An @as_unittest decorator can be used to tag any normal parameter-less function as a unittest TestCase. Then, both nose and normal unittest will recognize it as such. This will make it easier to migrate away from Nose if we ever need/want to while maintaining very lightweight tests. NOTE: This file contains IPython-specific decorators. Using the machinery in IPython.external.decorators, we import either numpy.testing.decorators if numpy is available, OR use equivalent code in IPython.external._decorators, which we've copied verbatim from numpy. � N)� import_module)� decorator� )� ipdoctest�ipdocstringc s"