Sh3ll
OdayForums


Server : LiteSpeed
System : Linux premium84.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
User : claqxcrl ( 523)
PHP Version : 8.1.32
Disable Function : NONE
Directory :  /opt/alt/python35/lib64/python3.5/idlelib/idle_test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python35/lib64/python3.5/idlelib/idle_test/__pycache__/test_warning.cpython-35.opt-2.pyc


���]�
�@s�ddlZddlmZddlZejZdejkZddlmZddlm	Z
dZedZGdd	�d	ej
�ZGd
d�dej
�Zedkr�ejd
ddd�dS)�N)�captured_stderrZidle)�run)�PyShellzf
Warning (from warnings module):
  File "test_warning.py", line 99
    Line of code
UserWarning: Test
z>>> c@s:eZdZejed�dd��Zdd�ZdS)�RunWarnTestz#Does not work when run within Idle.cCsZ|jtjt�tjd�|jtjtj�tjd�|jtjt�dS)NTF)�assertIs�warnings�showwarningr�capture_warnings�idle_showwarning_subproc)�self�r�1/opt/alt/python35/lib64/python3.5/test_warning.py�test_showwarnings"s


zRunWarnTest.test_showwarningscCsUt��E}tjdtdd|d�|jtj�|j�j��WdQRXdS)N�Testztest_warning.py�czLine of code)rrr
�UserWarning�assertEqual�idlemsg�
splitlines�getvalue)r�frrr
�
test_run_show*szRunWarnTest.test_run_showN)�__name__�
__module__�__qualname__�unittest�skipIf�running_in_idlerrrrrr
r src@sFeZdZejed�dd��Zdd�Zdd�ZdS)	�
ShellWarnTestz#Does not work when run within Idle.cCsZ|jtjt�tjd�|jtjtj�tjd�|jtjt�dS)NTF)rrr�shellr	�idle_showwarning)rrrr
r3s


zShellWarnTest.test_showwarningscCs/tjdtddd�}|jt|�dS)Nrztest_warning.pyrzLine of code)rZidle_formatwarningrrr)r�srrr
�test_idle_formatter;sz!ShellWarnTest.test_idle_formattercCsUt��E}tjdtdd|d�|jtj�|j�j��WdQRXdS)Nrztest_warning.pyrzLine of code)rrr rr�shellmsgrr)rrrrr
�test_shell_showAszShellWarnTest.test_shell_showN)	rrrrrrrr"r$rrrr
r1sr�__main__�	verbosity��exitF)rZtest.supportrrrrrZidlelibrrrrr#ZTestCaserr�mainrrrr
�<module>	s		


ZeroDay Forums Mini