|
Server : LiteSpeed System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64 User : nandedex ( 1060) PHP Version : 8.1.33 Disable Function : NONE Directory : /opt/cppython/lib/python3.8/unittest/test/__pycache__/ |
U
@��g � @ s� d Z ddlZddlZddlZdd� ZG dd� dej�Zedkr�ejdd ��6Z e
ej�d
krpejdej�
� d� nejdd
� W 5 Q R X e D ]Zeej� q�dS )a�
This module has a number of tests that raise different kinds of warnings.
When the tests are run, the warnings are caught and their messages are printed
to stdout. This module also accepts an arg that is then passed to
unittest.main to affect the behavior of warnings.
Test_TextTestRunner.test_warnings executes this script with different
combinations of warnings args and -W flags and check that the output is correct.
See #10535.
� Nc C s t �dt� d S )N�rw)�warnings�warn�RuntimeWarning� r r �;/opt/cppython/lib/python3.8/unittest/test/_test_warnings.py�warnfun s r c @ sD e Zd Zdd� Zdd� Zdd� Zdd� Zd d
� Zdd� Zd
d� Z dS )�TestWarningsc C s( | � dd� | � dd� | � dd� d S )N� )ZassertEquals��selfr r r �test_assert s zTestWarnings.test_assertc C s | � d� | � d� d S )N� T)Z
failUnlessr r r r � test_fail s
zTestWarnings.test_failc C s | � dd� | �dd� d S )Nr
� � )ZassertAlmostEqualZassertNotAlmostEqualr r r r �test_other_unittest s z TestWarnings.test_other_unittestc C s( t �dt� t �dt� t �dt� d S )NZdw)r r �DeprecationWarningr r r r �test_deprecation% s zTestWarnings.test_deprecationc C s( t �dt� t �dt� t �dt� d S )N�iw)r r �
ImportWarningr r r r �test_import* s zTestWarnings.test_importc C s"