Uname: Linux premium294.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
Software: LiteSpeed
PHP version: 8.1.32 [ PHP INFO ] PHP os: Linux
Server Ip: 104.21.32.1
Your Ip: 216.73.216.223
User: mjbynoyq (1574) | Group: mjbynoyq (1570)
Safe Mode: OFF
Disable Function:
NONE

name : test_warning.cpython-37.opt-2.pyc
B

YI~d�
�@s�ddlmZddlmZddlZddlmZddlZejZdej	kZ
dZedZGdd	�d	ej
�ZGd
d�dej
�Ze	dkr�ejd
d�dS)�)�run)�pyshellN)�captured_stderrZidlezf
Warning (from warnings module):
  File "test_warning.py", line 99
    Line of code
UserWarning: Test
z>>> c@s(eZdZe�ed�dd��Zdd�ZdS)�RunWarnTestz#Does not work when run within Idle.cCsD|�tjt�t�d�|�tjtj�t�d�|�tjt�dS)NTF)�assertIs�warnings�showwarningr�capture_warnings�idle_showwarning_subproc)�self�r�C/opt/alt/python37/lib64/python3.7/idlelib/idle_test/test_warning.py�test_showwarnings!s


zRunWarnTest.test_showwarningsc	CsBt��2}t�dtdd|d�|�t��|�����WdQRXdS)N�Testztest_warning.py�czLine of code)rrr
�UserWarning�assertEqual�idlemsg�
splitlines�getvalue)r�frrr
�
test_run_show)szRunWarnTest.test_run_showN)�__name__�
__module__�__qualname__�unittest�skipIf�running_in_idlerrrrrr
rsrc@s0eZdZe�ed�dd��Zdd�Zdd�ZdS)	�
ShellWarnTestz#Does not work when run within Idle.cCsD|�tjt�t�d�|�tjtj�t�d�|�tjt�dS)NTF)rrr�shellr	�idle_showwarning)rrrr
r3s


zShellWarnTest.test_showwarningscCs"t�dtddd�}|�t|�dS)Nrztest_warning.pyrzLine of code)rZidle_formatwarningrrr)r�srrr
�test_idle_formatter;sz!ShellWarnTest.test_idle_formatterc	CsBt��2}t�dtdd|d�|�t��|�����WdQRXdS)Nrztest_warning.pyrzLine of code)rrr rr�shellmsgrr)rrrrr
�test_shell_showAszShellWarnTest.test_shell_showN)	rrrrrrrr"r$rrrr
r1sr�__main__�)�	verbosity)ZidlelibrrrrZtest.supportrrrrrrr#ZTestCaserr�mainrrrr
�<module>s
	
© 2025 XylotrechusZ