← Back
Editing: noseclasses.cpython-311.pyc
� ���c�8 � �� � d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZ d dl m Z mZ d dlm Z d dlmZ ddlmZ ddlmZmZ G d � d ej � � Z G d� dej � � Z G d � dej � � Z ej � � Z G d� dej � � Z G d� d� � Z G d� de� � Z e Z! G d� de � � Z" G d� dej# j$ � � Z%dS )� N)�doctests)� ErrorClass�ErrorClassPlugin)�Plugin)�src� )�get_package_name)�KnownFailureException�KnownFailureTestc � � e Zd Zd� Zd� ZdS )�NumpyDocTestFinderc � � |�dS t j |� � r|j |j u S t j |� � r|j |j k S t j |� � r|j |j k S t j |� � r|j |j j j k S t j |� � �|t j |� � u S t |d� � r|j |j k S t |t � � rdS t d� � �)zY Return true if the given object is defined in the given module. NT� __module__z"object must be a class or function)�inspect� isfunction�__dict__�__globals__� isbuiltin�__name__r �isclass�ismethod�__self__� __class__� getmodule�hasattr� isinstance�property� ValueError)�self�module�objects �D/usr/lib/python3/dist-packages/numpy/testing/_private/noseclasses.py�_from_modulezNumpyDocTestFinder._from_module s � � �>��4� � �� '� '� C��?�f�&8�8�8� � �v� &� &� C��?�f�&7�7�7� �_�V� $� $� C��?�f�&7�7�7� � �f� %� %� C� �?�f�o�&?�&J�J�J� � �v� &� &� 2��W�.�v�6�6�6�6� �V�\� *� *� C��?�f�&7�7�7� ��� )� )� C��4��A�B�B�B� c �P � t j � | |||||||� � ddlm}m} m} m}m} | |� � rt| j rm|j � � � D ]S\ } }|� d| � �} ||� � s | |� � r1| � ||� � r| � |||||||� � �T | |� � r�| j r�|j � � � D ]�\ } }t |t � � rt || � � }t |t � � rt || � � j } ||� � s+ | |� � s ||� � st |t$ � � r8| � ||� � r"|� d| � �} | � ||| ||||� � ��dS dS dS )zm Find tests for the given object and any contained objects, and add them to `tests`. r )� isroutiner �ismoduler r �.N)�doctest� DocTestFinder�_findr r&