@@ -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 ):
@@ -1851,7 +1845,6 @@ def h(x):
18511845 self .assertEqual (len (overloads ), 2 )
18521846 self .assertEqual (overloads [0 ].__deprecated__ , "no more ints" )
18531847
1854- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
18551848 def test_class (self ):
18561849 @deprecated ("A will go away soon" )
18571850 class A :
@@ -1863,7 +1856,6 @@ class A:
18631856 with self .assertRaises (TypeError ):
18641857 A (42 )
18651858
1866- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
18671859 def test_class_with_init (self ):
18681860 @deprecated ("HasInit will go away soon" )
18691861 class HasInit :
@@ -1874,7 +1866,6 @@ def __init__(self, x):
18741866 instance = HasInit (42 )
18751867 self .assertEqual (instance .x , 42 )
18761868
1877- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
18781869 def test_class_with_new (self ):
18791870 has_new_called = False
18801871
@@ -1893,7 +1884,6 @@ def __init__(self, x) -> None:
18931884 self .assertEqual (instance .x , 42 )
18941885 self .assertTrue (has_new_called )
18951886
1896- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
18971887 def test_class_with_inherited_new (self ):
18981888 new_base_called = False
18991889
@@ -1915,7 +1905,6 @@ class HasInheritedNew(NewBase):
19151905 self .assertEqual (instance .x , 42 )
19161906 self .assertTrue (new_base_called )
19171907
1918- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
19191908 def test_class_with_new_but_no_init (self ):
19201909 new_called = False
19211910
@@ -1933,7 +1922,6 @@ def __new__(cls, x):
19331922 self .assertEqual (instance .x , 42 )
19341923 self .assertTrue (new_called )
19351924
1936- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
19371925 def test_mixin_class (self ):
19381926 @deprecated ("Mixin will go away soon" )
19391927 class Mixin :
@@ -1950,7 +1938,6 @@ class Child(Base, Mixin):
19501938 instance = Child (42 )
19511939 self .assertEqual (instance .a , 42 )
19521940
1953- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
19541941 def test_do_not_shadow_user_arguments (self ):
19551942 new_called = False
19561943 new_called_cls = None
@@ -1970,7 +1957,6 @@ class Foo(metaclass=MyMeta, cls='haha'):
19701957 self .assertTrue (new_called )
19711958 self .assertEqual (new_called_cls , 'haha' )
19721959
1973- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
19741960 def test_existing_init_subclass (self ):
19751961 @deprecated ("C will go away soon" )
19761962 class C :
@@ -1987,7 +1973,6 @@ class D(C):
19871973 self .assertTrue (D .inited )
19881974 self .assertIsInstance (D (), D ) # no deprecation
19891975
1990- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
19911976 def test_existing_init_subclass_in_base (self ):
19921977 class Base :
19931978 def __init_subclass__ (cls , x ) -> None :
@@ -2008,7 +1993,6 @@ class D(C, x=3):
20081993
20091994 self .assertEqual (D .inited , 3 )
20101995
2011- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
20121996 def test_existing_init_subclass_in_sibling_base (self ):
20131997 @deprecated ("A will go away soon" )
20141998 class A :
@@ -2028,7 +2012,6 @@ class D(B, A, x=42):
20282012 pass
20292013 self .assertEqual (D .inited , 42 )
20302014
2031- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
20322015 def test_init_subclass_has_correct_cls (self ):
20332016 init_subclass_saw = None
20342017
@@ -2046,7 +2029,6 @@ class C(Base):
20462029
20472030 self .assertIs (init_subclass_saw , C )
20482031
2049- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
20502032 def test_init_subclass_with_explicit_classmethod (self ):
20512033 init_subclass_saw = None
20522034
@@ -2065,7 +2047,6 @@ class C(Base):
20652047
20662048 self .assertIs (init_subclass_saw , C )
20672049
2068- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
20692050 def test_function (self ):
20702051 @deprecated ("b will go away soon" )
20712052 def b ():
@@ -2074,7 +2055,6 @@ def b():
20742055 with self .assertWarnsRegex (DeprecationWarning , "b will go away soon" ):
20752056 b ()
20762057
2077- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
20782058 def test_method (self ):
20792059 class Capybara :
20802060 @deprecated ("x will go away soon" )
@@ -2085,7 +2065,6 @@ def x(self):
20852065 with self .assertWarnsRegex (DeprecationWarning , "x will go away soon" ):
20862066 instance .x ()
20872067
2088- @unittest .expectedFailure # TODO: RUSTPYTHON; DeprecationWarning not triggered
20892068 def test_property (self ):
20902069 class Capybara :
20912070 @property
@@ -2113,7 +2092,6 @@ def no_more_setting(self, value):
21132092 with self .assertWarnsRegex (DeprecationWarning , "no more setting" ):
21142093 instance .no_more_setting = 42
21152094
2116- @unittest .expectedFailure # TODO: RUSTPYTHON; RuntimeWarning not triggered
21172095 def test_category (self ):
21182096 @deprecated ("c will go away soon" , category = RuntimeWarning )
21192097 def c ():
0 commit comments