a  ze @sdZddlZddlZddlZddZGdddejZedkrejdd @Z e ej d krpej d ej d n ej d d Wdn1s0Ye D]ZeejqdS)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. NcCstdtdS)Nrw)warningswarnRuntimeWarningrrP/opt/bitninja-python-dojo/embedded/lib/python3.9/unittest/test/_test_warnings.pywarnfunsrc@sDeZdZddZddZddZddZd d Zd d Zd dZ dS) TestWarningscCs(|dd|dd|dddS)N)Z assertEqualsselfrrr test_asserts  zTestWarnings.test_assertcCs|d|ddS)NT)Z failUnlessr rrr test_fails zTestWarnings.test_failcCs|dd|dddS)Nr )ZassertAlmostEqualZassertNotAlmostEqualr rrrtest_other_unittest s z TestWarnings.test_other_unittestcCs(tdttdttdtdS)NZdw)rrDeprecationWarningr rrrtest_deprecation%s  zTestWarnings.test_deprecationcCs(tdttdttdtdS)Niw)rr ImportWarningr rrr test_import*s  zTestWarnings.test_importcCs"tdtdtddS)NZuw)rrr rrr test_warning0s  zTestWarnings.test_warningcCstttdS)N)rr rrr test_function7szTestWarnings.test_functionN) __name__ __module__ __qualname__r rrrrrrrrrrr sr __main__T)recordrF)exitr)r)__doc__sysZunittestrrZTestCaser rcatch_warningswslenargvmainpopwprintmessagerrrrs +*