ž
©ÿfÀ
c @ sÑ d Z d d l Z d d l m Z d d l Z e j Z d e j k Z d d l m Z d d l m
Z d Z e d Z
Gd d
„ d
e j ƒ Z Gd d „ d e j ƒ Z e d
k rÍ e j d d d d ƒ n d S( u6 Test warnings replacement in PyShell.py and run.py.
This file could be expanded to include traceback overrides
(in same two modules). If so, change name.
Revise if output destination changes (http://bugs.python.org/issue18318).
Make sure warnings module is left unaltered (http://bugs.python.org/issue18081).
i N( u captured_stderru idle( u run( u PyShelluf
Warning (from warnings module):
File "test_warning.py", line 99
Line of code
UserWarning: Test
u >>> c B s> | Ee Z d Z e j e d ƒ d d „ ƒ Z d d „ Z d S( u RunWarnTestu# Does not work when run within Idle.c C sZ | j t j t ƒ t j d ƒ | j t j t j ƒ t j d ƒ | j t j t ƒ d S( NTF( u assertIsu warningsu showwarningu runu capture_warningsu Trueu idle_showwarning_subprocu False( u self( ( uC /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_warning.pyu test_showwarnings" s
u RunWarnTest.test_showwarningsc C sT t ƒ E } t j d t d d | d ƒ | j t j ƒ | j ƒ j ƒ ƒ Wd QXd S( Nu Testu test_warning.pyic u Line of code( u captured_stderru runu idle_showwarning_subprocu UserWarningu assertEqualu idlemsgu
splitlinesu getvalue( u selfu f( ( uC /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_warning.pyu
test_run_show* s u RunWarnTest.test_run_showN( u __name__u
__module__u __qualname__u unittestu skipIfu running_in_idleu test_showwarningsu
test_run_show( u
__locals__( ( uC /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_warning.pyu RunWarnTest s u RunWarnTestc B sJ | Ee Z d Z e j e d ƒ d d „ ƒ Z d d „ Z d d „ Z d S( u
ShellWarnTestu# Does not work when run within Idle.c C sZ | j t j t ƒ t j d ƒ | j t j t j ƒ t j d ƒ | j t j t ƒ d S( NTF( u assertIsu warningsu showwarningu shellu capture_warningsu Trueu idle_showwarningu False( u self( ( uC /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_warning.pyu test_showwarnings3 s
u ShellWarnTest.test_showwarningsc C s/ t j d t d d d ƒ } | j t | ƒ d S( Nu Testu test_warning.pyic u Line of code( u shellu idle_formatwarningu UserWarningu assertEqualu idlemsg( u selfu s( ( uC /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_warning.pyu test_idle_formatter; s u! ShellWarnTest.test_idle_formatterc C sT t ƒ E } t j d t d d | d ƒ | j t j ƒ | j ƒ j ƒ ƒ Wd QXd S( Nu Testu test_warning.pyic u Line of code( u captured_stderru shellu idle_showwarningu UserWarningu assertEqualu shellmsgu
splitlinesu getvalue( u selfu f( ( uC /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_warning.pyu test_shell_showA s u ShellWarnTest.test_shell_showN( u __name__u
__module__u __qualname__u unittestu skipIfu running_in_idleu test_showwarningsu test_idle_formatteru test_shell_show( u
__locals__( ( uC /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_warning.pyu
ShellWarnTest1 s u
ShellWarnTestu __main__u verbosityi u exitF( u __doc__u unittestu test.supportu captured_stderru warningsu showwarningu __name__u running_in_idleu idlelibu runu PyShellu shellu idlemsgu shellmsgu TestCaseu RunWarnTestu
ShellWarnTestu mainu False( ( ( uC /opt/alt/python33/lib64/python3.3/idlelib/idle_test/test_warning.pyu