| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/IPython/testing/__pycache__/ |
Upload File : |
�
�@�c� � � � d Z ddlZddlZddlmZmZmZ ddlmZ d� Z G d� de
� � Z G d� d e
� � Zd
� Z
e� � Z e� � ZdS )a� Experimental code for cleaner support of IPython syntax with unittest.
In IPython up until 0.10, we've used very hacked up nose machinery for running
tests with IPython special syntax, and this has proved to be extremely slow.
This module provides decorators to try a different approach, stemming from a
conversation Brian and I (FP) had about this problem Sept/09.
The goal is to be able to easily write simple functions that can be seen by
unittest as tests, and ultimately for these to support doctests with full
IPython syntax. Nose already offers this based on naming conventions and our
hackish plugins, but we are seeking to move away from nose dependencies if
possible.
This module follows a different approach, based on decorators.
- A decorator called @ipdoctest can mark any function as having a docstring
that should be viewed as a doctest, but after syntax conversion.
Authors
-------
- Fernando Perez <Fernando.Perez@berkeley.edu>
� N)�
DocTestFinder�
DocTestRunner�TestResults)�InteractiveShellc �H � d� | j � � � D � � S )zmCount number of failures in a doctest runner.
Code modeled after the summarize() method in doctest.
c �@ � g | ]\ }}|d k �t ||� � ��S )r )r )�.0�f�ts �</usr/lib/python3/dist-packages/IPython/testing/ipunittest.py�
<listcomp>z"count_failures.<locals>.<listcomp>4 s+ � �M�M�M�$�!�Q�a�!�e�e�K��1���e�e�e� )�_name2ft�values)�runners r �count_failuresr / s'