@@ -807,7 +807,6 @@ 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; AssertionError: 'function' object has unexpected attribute '__code__'
811810 def test_accelerated (self ):
812811 self .assertIsNot (original_warnings , self .module )
813812 self .assertNotHasAttr (self .module .warn , '__code__' )
@@ -1012,7 +1011,6 @@ def test_showwarning_missing(self):
10121011 result = stream .getvalue ()
10131012 self .assertIn (text , result )
10141013
1015- @unittest .expectedFailure # TODO: RUSTPYTHON; AttributeError: module 'warnings' has no attribute '_showwarnmsg'. Did you mean: 'showwarning'?
10161014 def test_showwarnmsg_missing (self ):
10171015 # Test that _showwarnmsg() missing is okay.
10181016 text = 'del _showwarnmsg test'
@@ -1458,15 +1456,13 @@ class PyCatchWarningTests(CatchWarningTests, unittest.TestCase):
14581456
14591457class EnvironmentVariableTests (BaseTest ):
14601458
1461- @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: b'[]' != b"['ignore::DeprecationWarning']"
14621459 def test_single_warning (self ):
14631460 rc , stdout , stderr = assert_python_ok ("-c" ,
14641461 "import sys; sys.stdout.write(str(sys.warnoptions))" ,
14651462 PYTHONWARNINGS = "ignore::DeprecationWarning" ,
14661463 PYTHONDEVMODE = "" )
14671464 self .assertEqual (stdout , b"['ignore::DeprecationWarning']" )
14681465
1469- @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: b'[]' != b"['ignore::DeprecationWarning', 'ignore::UnicodeWarning']"
14701466 def test_comma_separated_warnings (self ):
14711467 rc , stdout , stderr = assert_python_ok ("-c" ,
14721468 "import sys; sys.stdout.write(str(sys.warnoptions))" ,
@@ -1475,7 +1471,6 @@ def test_comma_separated_warnings(self):
14751471 self .assertEqual (stdout ,
14761472 b"['ignore::DeprecationWarning', 'ignore::UnicodeWarning']" )
14771473
1478- @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: b"['ignore::UnicodeWarning']" != b"['ignore::DeprecationWarning', 'ignore::UnicodeWarning']"
14791474 @force_not_colorized
14801475 def test_envvar_and_command_line (self ):
14811476 rc , stdout , stderr = assert_python_ok ("-Wignore::UnicodeWarning" , "-c" ,
@@ -1535,7 +1530,6 @@ def test_default_filter_configuration(self):
15351530 self .assertEqual (stdout_lines , expected_output )
15361531
15371532
1538- @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: b'[]' != b"['ignore:DeprecationWarning\xc3\xa6']"
15391533 @unittest .skipUnless (sys .getfilesystemencoding () != 'ascii' ,
15401534 'requires non-ascii filesystemencoding' )
15411535 def test_nonascii (self ):
@@ -1550,10 +1544,6 @@ def test_nonascii(self):
15501544class CEnvironmentVariableTests (EnvironmentVariableTests , unittest .TestCase ):
15511545 module = c_warnings
15521546
1553- @unittest .expectedFailure # TODO: RUSTPYTHON; Lists differ
1554- def test_default_filter_configuration (self ):
1555- return super ().test_default_filter_configuration ()
1556-
15571547class PyEnvironmentVariableTests (EnvironmentVariableTests , unittest .TestCase ):
15581548 module = py_warnings
15591549
@@ -1851,7 +1841,6 @@ def h(x):
18511841 self .assertEqual (len (overloads ), 2 )
18521842 self .assertEqual (overloads [0 ].__deprecated__ , "no more ints" )
18531843
1854- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
18551844 def test_class (self ):
18561845 @deprecated ("A will go away soon" )
18571846 class A :
@@ -1863,7 +1852,6 @@ class A:
18631852 with self .assertRaises (TypeError ):
18641853 A (42 )
18651854
1866- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
18671855 def test_class_with_init (self ):
18681856 @deprecated ("HasInit will go away soon" )
18691857 class HasInit :
@@ -1874,7 +1862,6 @@ def __init__(self, x):
18741862 instance = HasInit (42 )
18751863 self .assertEqual (instance .x , 42 )
18761864
1877- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
18781865 def test_class_with_new (self ):
18791866 has_new_called = False
18801867
@@ -1893,7 +1880,6 @@ def __init__(self, x) -> None:
18931880 self .assertEqual (instance .x , 42 )
18941881 self .assertTrue (has_new_called )
18951882
1896- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
18971883 def test_class_with_inherited_new (self ):
18981884 new_base_called = False
18991885
@@ -1915,7 +1901,6 @@ class HasInheritedNew(NewBase):
19151901 self .assertEqual (instance .x , 42 )
19161902 self .assertTrue (new_base_called )
19171903
1918- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
19191904 def test_class_with_new_but_no_init (self ):
19201905 new_called = False
19211906
@@ -1933,7 +1918,6 @@ def __new__(cls, x):
19331918 self .assertEqual (instance .x , 42 )
19341919 self .assertTrue (new_called )
19351920
1936- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
19371921 def test_mixin_class (self ):
19381922 @deprecated ("Mixin will go away soon" )
19391923 class Mixin :
@@ -1950,7 +1934,6 @@ class Child(Base, Mixin):
19501934 instance = Child (42 )
19511935 self .assertEqual (instance .a , 42 )
19521936
1953- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
19541937 def test_do_not_shadow_user_arguments (self ):
19551938 new_called = False
19561939 new_called_cls = None
@@ -1970,7 +1953,6 @@ class Foo(metaclass=MyMeta, cls='haha'):
19701953 self .assertTrue (new_called )
19711954 self .assertEqual (new_called_cls , 'haha' )
19721955
1973- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
19741956 def test_existing_init_subclass (self ):
19751957 @deprecated ("C will go away soon" )
19761958 class C :
@@ -1987,7 +1969,6 @@ class D(C):
19871969 self .assertTrue (D .inited )
19881970 self .assertIsInstance (D (), D ) # no deprecation
19891971
1990- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
19911972 def test_existing_init_subclass_in_base (self ):
19921973 class Base :
19931974 def __init_subclass__ (cls , x ) -> None :
@@ -2008,7 +1989,6 @@ class D(C, x=3):
20081989
20091990 self .assertEqual (D .inited , 3 )
20101991
2011- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
20121992 def test_existing_init_subclass_in_sibling_base (self ):
20131993 @deprecated ("A will go away soon" )
20141994 class A :
@@ -2028,7 +2008,6 @@ class D(B, A, x=42):
20282008 pass
20292009 self .assertEqual (D .inited , 42 )
20302010
2031- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
20322011 def test_init_subclass_has_correct_cls (self ):
20332012 init_subclass_saw = None
20342013
@@ -2046,7 +2025,6 @@ class C(Base):
20462025
20472026 self .assertIs (init_subclass_saw , C )
20482027
2049- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
20502028 def test_init_subclass_with_explicit_classmethod (self ):
20512029 init_subclass_saw = None
20522030
@@ -2065,7 +2043,6 @@ class C(Base):
20652043
20662044 self .assertIs (init_subclass_saw , C )
20672045
2068- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
20692046 def test_function (self ):
20702047 @deprecated ("b will go away soon" )
20712048 def b ():
@@ -2074,7 +2051,6 @@ def b():
20742051 with self .assertWarnsRegex (DeprecationWarning , "b will go away soon" ):
20752052 b ()
20762053
2077- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
20782054 def test_method (self ):
20792055 class Capybara :
20802056 @deprecated ("x will go away soon" )
@@ -2085,7 +2061,6 @@ def x(self):
20852061 with self .assertWarnsRegex (DeprecationWarning , "x will go away soon" ):
20862062 instance .x ()
20872063
2088- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
20892064 def test_property (self ):
20902065 class Capybara :
20912066 @property
@@ -2113,7 +2088,6 @@ def no_more_setting(self, value):
21132088 with self .assertWarnsRegex (DeprecationWarning , "no more setting" ):
21142089 instance .no_more_setting = 42
21152090
2116- @unittest .expectedFailure # TODO: RUSTPYTHON; RuntimeWarning not triggered
21172091 def test_category (self ):
21182092 @deprecated ("c will go away soon" , category = RuntimeWarning )
21192093 def c ():
0 commit comments