@@ -534,6 +534,14 @@ def test_improper_input(self):
534
534
self .module ._setoption ('error::Warning::0' )
535
535
self .assertRaises (UserWarning , self .module .warn , 'convert to error' )
536
536
537
+
538
+ class CWCmdLineTests (WCmdLineTests , unittest .TestCase ):
539
+ module = c_warnings
540
+
541
+
542
+ class PyWCmdLineTests (WCmdLineTests , unittest .TestCase ):
543
+ module = py_warnings
544
+
537
545
def test_improper_option (self ):
538
546
# Same as above, but check that the message is printed out when
539
547
# the interpreter is executed. This also checks that options are
@@ -550,12 +558,6 @@ def test_warnings_bootstrap(self):
550
558
self .assertFalse (out .strip ())
551
559
self .assertNotIn (b'RuntimeWarning' , err )
552
560
553
- class CWCmdLineTests (WCmdLineTests , unittest .TestCase ):
554
- module = c_warnings
555
-
556
- class PyWCmdLineTests (WCmdLineTests , unittest .TestCase ):
557
- module = py_warnings
558
-
559
561
560
562
class _WarningsTests (BaseTest , unittest .TestCase ):
561
563
@@ -931,6 +933,7 @@ def test_issue_8766(self):
931
933
# Use -W to load warnings module at startup
932
934
assert_python_ok ('-c' , 'pass' , '-W' , 'always' , PYTHONPATH = cwd )
933
935
936
+
934
937
class FinalizationTest (unittest .TestCase ):
935
938
def test_finalization (self ):
936
939
# Issue #19421: warnings.warn() should not crash
0 commit comments