@@ -565,7 +565,7 @@ def test_stacklevel(self):
565565 self .assertEqual (os .path .basename (w [- 1 ].filename ),
566566 "<sys>" )
567567
568- @unittest .expectedFailure # TODO: RUSTPYTHON
568+ @unittest .expectedFailure # TODO: RUSTPYTHON; + crates/pylib/Lib/test/test_warnings/__init__.py
569569 def test_stacklevel_import (self ):
570570 # Issue #24305: With stacklevel=2, module-level warnings should work.
571571 import_helper .unload ('test.test_warnings.data.import_warning' )
@@ -807,43 +807,43 @@ class CWarnTests(WarnTests, unittest.TestCase):
807807
808808 # As an early adopter, we sanity check the
809809 # test.import_helper.import_fresh_module utility function
810- @unittest .expectedFailure # TODO: RUSTPYTHON
810+ @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: 'function' object has unexpected attribute '__code__'
811811 def test_accelerated (self ):
812812 self .assertIsNot (original_warnings , self .module )
813813 self .assertNotHasAttr (self .module .warn , '__code__' )
814814
815- @unittest .expectedFailure # TODO: RUSTPYTHON
815+ @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: 1 != 2
816816 def test_gh86298_loader_and_spec_loader_disagree (self ):
817817 return super ().test_gh86298_loader_and_spec_loader_disagree ()
818818
819- @unittest .expectedFailure # TODO: RUSTPYTHON
820- def test_gh86298_loader_is_none_and_spec_is_none (self ):
821- return super ().test_gh86298_loader_is_none_and_spec_is_none ()
822-
823- @unittest .expectedFailure # TODO: RUSTPYTHON
824- def test_gh86298_loader_is_none_and_spec_loader_is_none (self ):
825- return super ().test_gh86298_loader_is_none_and_spec_loader_is_none ()
826-
827- @unittest .expectedFailure # TODO: RUSTPYTHON
828- def test_gh86298_no_loader_and_no_spec_loader (self ):
829- return super ().test_gh86298_no_loader_and_no_spec_loader ()
830-
831- @unittest .expectedFailure # TODO: RUSTPYTHON
832- def test_gh86298_no_loader_and_spec_is_none (self ):
833- return super ().test_gh86298_no_loader_and_spec_is_none ()
834-
835- @unittest .expectedFailure # TODO: RUSTPYTHON
819+ @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: 1 != 2
836820 def test_gh86298_no_spec (self ):
837821 return super ().test_gh86298_no_spec ()
838822
839- @unittest .expectedFailure # TODO: RUSTPYTHON
823+ @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: 1 != 2
840824 def test_gh86298_no_spec_loader (self ):
841825 return super ().test_gh86298_no_spec_loader ()
842826
843- @unittest .expectedFailure # TODO: RUSTPYTHON
827+ @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: 1 != 2
844828 def test_gh86298_spec_is_none (self ):
845829 return super ().test_gh86298_spec_is_none ()
846830
831+ @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: AttributeError not raised
832+ def test_gh86298_no_loader_and_no_spec_loader (self ):
833+ return super ().test_gh86298_no_loader_and_no_spec_loader ()
834+
835+ @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: ValueError not raised
836+ def test_gh86298_loader_is_none_and_spec_is_none (self ):
837+ return super ().test_gh86298_loader_is_none_and_spec_is_none ()
838+
839+ @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: ValueError not raised
840+ def test_gh86298_loader_is_none_and_spec_loader_is_none (self ):
841+ return super ().test_gh86298_loader_is_none_and_spec_loader_is_none ()
842+
843+ @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: ValueError not raised
844+ def test_gh86298_no_loader_and_spec_is_none (self ):
845+ return super ().test_gh86298_no_loader_and_spec_is_none ()
846+
847847class PyWarnTests (WarnTests , unittest .TestCase ):
848848 module = py_warnings
849849
@@ -919,7 +919,7 @@ class _WarningsTests(BaseTest, unittest.TestCase):
919919
920920 module = c_warnings
921921
922- @unittest .expectedFailure # TODO: RUSTPYTHON
922+ @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: UserWarning not raised by warn
923923 def test_filter (self ):
924924 # Everything should function even if 'filters' is not in warnings.
925925 with self .module .catch_warnings () as w :
@@ -930,7 +930,7 @@ def test_filter(self):
930930 self .assertRaises (UserWarning , self .module .warn ,
931931 'convert to error' )
932932
933- @unittest .expectedFailure # TODO: RUSTPYTHON
933+ @unittest .expectedFailure # TODO: RUSTPYTHON; AttributeError: module 'warnings' has no attribute 'onceregistry'
934934 def test_onceregistry (self ):
935935 # Replacing or removing the onceregistry should be okay.
936936 global __warningregistry__
@@ -960,7 +960,7 @@ def test_onceregistry(self):
960960 finally :
961961 self .module .onceregistry = original_registry
962962
963- @unittest .expectedFailure # TODO: RUSTPYTHON
963+ @unittest .expectedFailure # TODO: RUSTPYTHON; AttributeError: module 'warnings' has no attribute 'defaultaction'
964964 def test_default_action (self ):
965965 # Replacing or removing defaultaction should be okay.
966966 message = UserWarning ("defaultaction test" )
@@ -1012,7 +1012,7 @@ def test_showwarning_missing(self):
10121012 result = stream .getvalue ()
10131013 self .assertIn (text , result )
10141014
1015- @unittest .expectedFailure # TODO: RUSTPYTHON
1015+ @unittest .expectedFailure # TODO: RUSTPYTHON; AttributeError: module 'warnings' has no attribute '_showwarnmsg'. Did you mean: 'showwarning'?
10161016 def test_showwarnmsg_missing (self ):
10171017 # Test that _showwarnmsg() missing is okay.
10181018 text = 'del _showwarnmsg test'
@@ -1092,7 +1092,7 @@ def test_stderr_none(self):
10921092 self .assertNotIn (b'Warning!' , stderr )
10931093 self .assertNotIn (b'Error' , stderr )
10941094
1095- @unittest .expectedFailure # TODO: RUSTPYTHON
1095+ @unittest .expectedFailure # TODO: RUSTPYTHON; TypeError: 'int' object is not iterable
10961096 def test_issue31285 (self ):
10971097 # warn_explicit() should neither raise a SystemError nor cause an
10981098 # assertion failure, in case the return value of get_source() has a
@@ -1245,7 +1245,7 @@ class CWarningsDisplayTests(WarningsDisplayTests, unittest.TestCase):
12451245class PyWarningsDisplayTests (WarningsDisplayTests , unittest .TestCase ):
12461246 module = py_warnings
12471247
1248- @unittest .expectedFailure # TODO: RUSTPYTHON
1248+ @unittest .expectedFailure # TODO: RUSTPYTHON; + ResourceWarning: Enable tracemalloc to get the object allocation traceback
12491249 def test_tracemalloc (self ):
12501250 self .addCleanup (os_helper .unlink , os_helper .TESTFN )
12511251
@@ -1458,15 +1458,15 @@ class PyCatchWarningTests(CatchWarningTests, unittest.TestCase):
14581458
14591459class EnvironmentVariableTests (BaseTest ):
14601460
1461- @unittest .expectedFailure # TODO: RUSTPYTHON
1461+ @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: b'[]' != b"['ignore::DeprecationWarning']"
14621462 def test_single_warning (self ):
14631463 rc , stdout , stderr = assert_python_ok ("-c" ,
14641464 "import sys; sys.stdout.write(str(sys.warnoptions))" ,
14651465 PYTHONWARNINGS = "ignore::DeprecationWarning" ,
14661466 PYTHONDEVMODE = "" )
14671467 self .assertEqual (stdout , b"['ignore::DeprecationWarning']" )
14681468
1469- @unittest .expectedFailure # TODO: RUSTPYTHON
1469+ @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: b'[]' != b"['ignore::DeprecationWarning', 'ignore::UnicodeWarning']"
14701470 def test_comma_separated_warnings (self ):
14711471 rc , stdout , stderr = assert_python_ok ("-c" ,
14721472 "import sys; sys.stdout.write(str(sys.warnoptions))" ,
@@ -1475,7 +1475,7 @@ def test_comma_separated_warnings(self):
14751475 self .assertEqual (stdout ,
14761476 b"['ignore::DeprecationWarning', 'ignore::UnicodeWarning']" )
14771477
1478- @unittest .expectedFailure # TODO: RUSTPYTHON
1478+ @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: b"['ignore::UnicodeWarning']" != b"['ignore::DeprecationWarning', 'ignore::UnicodeWarning']"
14791479 @force_not_colorized
14801480 def test_envvar_and_command_line (self ):
14811481 rc , stdout , stderr = assert_python_ok ("-Wignore::UnicodeWarning" , "-c" ,
@@ -1485,7 +1485,7 @@ def test_envvar_and_command_line(self):
14851485 self .assertEqual (stdout ,
14861486 b"['ignore::DeprecationWarning', 'ignore::UnicodeWarning']" )
14871487
1488- @unittest .expectedFailure # TODO: RUSTPYTHON
1488+ @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: b"['error::DeprecationWarning']" != b"['default::DeprecationWarning', 'error::DeprecationWarning']"
14891489 @force_not_colorized
14901490 def test_conflicting_envvar_and_command_line (self ):
14911491 rc , stdout , stderr = assert_python_failure ("-Werror::DeprecationWarning" , "-c" ,
@@ -1535,7 +1535,7 @@ def test_default_filter_configuration(self):
15351535 self .assertEqual (stdout_lines , expected_output )
15361536
15371537
1538- @unittest .expectedFailure # TODO: RUSTPYTHON
1538+ @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: b'[]' != b"['ignore:DeprecationWarning\xc3\xa6']"
15391539 @unittest .skipUnless (sys .getfilesystemencoding () != 'ascii' ,
15401540 'requires non-ascii filesystemencoding' )
15411541 def test_nonascii (self ):
@@ -1623,7 +1623,7 @@ def test_issue_8766(self):
16231623
16241624
16251625class FinalizationTest (unittest .TestCase ):
1626- @unittest .expectedFailure # TODO: RUSTPYTHON
1626+ @unittest .expectedFailure # TODO: RUSTPYTHON; - TypeError: 'NoneType' object is not callable
16271627 def test_finalization (self ):
16281628 # Issue #19421: warnings.warn() should not crash
16291629 # during Python finalization
@@ -1641,7 +1641,7 @@ def __del__(self):
16411641 self .assertEqual (err .decode ().rstrip (),
16421642 '<string>:7: UserWarning: test' )
16431643
1644- @unittest .expectedFailure # TODO: RUSTPYTHON
1644+ @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: b'' doesn't start with b'<sys>:0: ResourceWarning: unclosed file '
16451645 def test_late_resource_warning (self ):
16461646 # Issue #21925: Emitting a ResourceWarning late during the Python
16471647 # shutdown must be logged.
0 commit comments