Your IP : 216.73.216.196


Current Path : /opt/alt/python310/lib64/python3.10/unittest/test/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/unittest/test/__pycache__/_test_warnings.cpython-310.pyc

o

0�i	�@s�dZddlZddlZddlZdd�ZGdd�dej�ZedkrWejdd	�� Z	e
ej�d
kr8ejdej�
�d�nejdd
�Wd�n1sHwYe	D]	Zeej�qOdSdS)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.
�NcCst�dt�dS)NZrw)�warnings�warn�RuntimeWarning�rr�C/opt/alt/python310/lib64/python3.10/unittest/test/_test_warnings.py�warnfunsrc@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�TestWarningscCs(|�dd�|�dd�|�dd�dS)N�)ZassertEquals��selfrrr�test_assert�zTestWarnings.test_assertcCs|�d�|�d�dS)N�T)Z
failUnlessr
rrr�	test_fails
zTestWarnings.test_failcCs|�dd�|�dd�dS)Nr	��)ZassertAlmostEqualZassertNotAlmostEqualr
rrr�test_other_unittest sz TestWarnings.test_other_unittestcC�(t�dt�t�dt�t�dt�dS)NZdw)rr�DeprecationWarningr
rrr�test_deprecation%r
zTestWarnings.test_deprecationcCr)NZiw)rr�
ImportWarningr
rrr�test_import*r
zTestWarnings.test_importcCs"t�d�t�d�t�d�dS)NZuw)rrr
rrr�test_warning0s

zTestWarnings.test_warningcCst�t�t�dS)N)rr
rrr�
test_function7s
zTestWarnings.test_functionN)
�__name__�
__module__�__qualname__rrrrrrrrrrrrsr�__main__T)�recordrF)�exitr)r)�__doc__�sysZunittestrrZTestCaserr�catch_warningsZws�len�argv�main�pop�w�print�messagerrrr�<module>s"
+���