@@ -88,7 +88,6 @@ def syntax_error_bad_indentation2(self):
8888 def tokenizer_error_with_caret_range (self ):
8989 compile ("blech ( " , "?" , "exec" )
9090
91- @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: 11 != 14
9291 def test_caret (self ):
9392 err = self .get_exception_format (self .syntax_error_with_caret ,
9493 SyntaxError )
@@ -201,7 +200,6 @@ def f():
201200 finally :
202201 unlink (TESTFN )
203202
204- @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: 3 != 4
205203 def test_bad_indentation (self ):
206204 err = self .get_exception_format (self .syntax_error_bad_indentation ,
207205 IndentationError )
@@ -1797,7 +1795,6 @@ class TestKeywordTypoSuggestions(unittest.TestCase):
17971795 ("for x im n:\n pass" , "in" ),
17981796 ]
17991797
1800- @unittest .expectedFailure # TODO: RUSTPYTHON
18011798 def test_keyword_suggestions_from_file (self ):
18021799 with tempfile .TemporaryDirectory () as script_dir :
18031800 for i , (code , expected_kw ) in enumerate (self .TYPO_CASES ):
@@ -1808,7 +1805,6 @@ def test_keyword_suggestions_from_file(self):
18081805 stderr_text = stderr .decode ('utf-8' )
18091806 self .assertIn (f"Did you mean '{ expected_kw } '" , stderr_text )
18101807
1811- @unittest .expectedFailure # TODO: RUSTPYTHON
18121808 def test_keyword_suggestions_from_command_string (self ):
18131809 for code , expected_kw in self .TYPO_CASES :
18141810 with self .subTest (typo = expected_kw ):
@@ -3352,7 +3348,6 @@ class MiscTracebackCases(unittest.TestCase):
33523348 # Check non-printing functions in traceback module
33533349 #
33543350
3355- @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: 1 != 0
33563351 def test_clear (self ):
33573352 def outer ():
33583353 middle ()
@@ -3574,7 +3569,6 @@ def format_frame_summary(self, frame_summary, colorize=False):
35743569 f' File "{ __file__ } ", line { lno } , in f\n 1/0\n '
35753570 )
35763571
3577- @unittest .expectedFailure # TODO: RUSTPYTHON; Actual: _should_show_carets(13, 14, ['# this line will be used during rendering'], None)
35783572 def test_summary_should_show_carets (self ):
35793573 # See: https://github.com/python/cpython/issues/122353
35803574
@@ -3731,7 +3725,6 @@ def test_context(self):
37313725 self .assertEqual (type (exc_obj ).__name__ , exc .exc_type_str )
37323726 self .assertEqual (str (exc_obj ), str (exc ))
37333727
3734- @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: 11 not greater than 1000
37353728 def test_long_context_chain (self ):
37363729 def f ():
37373730 try :
@@ -4059,7 +4052,6 @@ def test_exception_group_format_exception_onlyi_recursive(self):
40594052
40604053 self .assertEqual (formatted , expected )
40614054
4062- @unittest .expectedFailure # TODO: RUSTPYTHON; Diff is 2265 characters long. Set self.maxDiff to None to see it.
40634055 def test_exception_group_format (self ):
40644056 teg = traceback .TracebackException .from_exception (self .eg )
40654057
@@ -4841,19 +4833,15 @@ class PurePythonSuggestionFormattingTests(
48414833 traceback printing in traceback.py.
48424834 """
48434835
4844- @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: "'bluch'" not found in "ImportError: cannot import name 'blach'"
48454836 def test_import_from_suggestions_underscored (self ):
48464837 return super ().test_import_from_suggestions_underscored ()
48474838
4848- @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: "'bluch'" not found in "ImportError: cannot import name 'blech'"
48494839 def test_import_from_suggestions_non_string (self ):
48504840 return super ().test_import_from_suggestions_non_string ()
48514841
4852- @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: "'bluchin'?" not found in "ImportError: cannot import name 'bluch'"
48534842 def test_import_from_suggestions (self ):
48544843 return super ().test_import_from_suggestions ()
48554844
4856- @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: 'Did you mean' not found in "AttributeError: 'A' object has no attribute 'blich'"
48574845 def test_attribute_error_inside_nested_getattr (self ):
48584846 return super ().test_attribute_error_inside_nested_getattr ()
48594847
@@ -4969,7 +4957,6 @@ class MyList(list):
49694957class TestColorizedTraceback (unittest .TestCase ):
49704958 maxDiff = None
49714959
4972- @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: "y = \x1b[31mx['a']['b']\x1b[0m\x1b[1;31m['c']\x1b[0m" not found in 'Traceback (most recent call last):\n File \x1b[35m"/Users/al03219714/Projects/RustPython/crates/pylib/Lib/test/test_traceback.py"\x1b[0m, line \x1b[35m4764\x1b[0m, in \x1b[35mtest_colorized_traceback\x1b[0m\n \x1b[31mbar\x1b[0m\x1b[1;31m()\x1b[0m\n \x1b[31m~~~\x1b[0m\x1b[1;31m^^\x1b[0m\n bar = <function TestColorizedTraceback.test_colorized_traceback.<locals>.bar at 0xb57b09180>\n baz1 = <function TestColorizedTraceback.test_colorized_traceback.<locals>.baz1 at 0xb57b09e00>\n baz2 = <function TestColorizedTraceback.test_colorized_traceback.<locals>.baz2 at 0xb57b09cc0>\n e = TypeError("\'NoneType\' object is not subscriptable")\n foo = <function TestColorizedTraceback.test_colorized_traceback.<locals>.foo at 0xb57b08140>\n self = <test.test_traceback.TestColorizedTraceback testMethod=test_colorized_traceback>\n File \x1b[35m"/Users/al03219714/Projects/RustPython/crates/pylib/Lib/test/test_traceback.py"\x1b[0m, line \x1b[35m4760\x1b[0m, in \x1b[35mbar\x1b[0m\n return baz1(1,\n 2,3\n ,4)\n baz1 = <function TestColorizedTraceback.test_colorized_traceback.<locals>.baz1 at 0xb57b09e00>\n File \x1b[35m"/Users/al03219714/Projects/RustPython/crates/pylib/Lib/test/test_traceback.py"\x1b[0m, line \x1b[35m4757\x1b[0m, in \x1b[35mbaz1\x1b[0m\n return baz2(1,2,3,4)\n args = (1, 2, 3, 4)\n baz2 = <function TestColorizedTraceback.test_colorized_traceback.<locals>.baz2 at 0xb57b09cc0>\n File \x1b[35m"/Users/al03219714/Projects/RustPython/crates/pylib/Lib/test/test_traceback.py"\x1b[0m, line \x1b[35m4754\x1b[0m, in \x1b[35mbaz2\x1b[0m\n return \x1b[31m(lambda *args: foo(*args))\x1b[0m\x1b[1;31m(1,2,3,4)\x1b[0m\n \x1b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~\x1b[0m\x1b[1;31m^^^^^^^^^\x1b[0m\n args = (1, 2, 3, 4)\n foo = <function TestColorizedTraceback.test_colorized_traceback.<locals>.foo at 0xb57b08140>\n File \x1b[35m"/Users/al03219714/Projects/RustPython/crates/pylib/Lib/test/test_traceback.py"\x1b[0m, line \x1b[35m4754\x1b[0m, in \x1b[35m<lambda>\x1b[0m\n return (lambda *args: \x1b[31mfoo\x1b[0m\x1b[1;31m(*args)\x1b[0m)(1,2,3,4)\n \x1b[31m~~~\x1b[0m\x1b[1;31m^^^^^^^\x1b[0m\n args = (1, 2, 3, 4)\n foo = <function TestColorizedTraceback.test_colorized_traceback.<locals>.foo at 0xb57b08140>\n File \x1b[35m"/Users/al03219714/Projects/RustPython/crates/pylib/Lib/test/test_traceback.py"\x1b[0m, line \x1b[35m4751\x1b[0m, in \x1b[35mfoo\x1b[0m\n y = x[\'a\'][\'b\'][\x1b[1;31m\'c\'\x1b[0m]\n \x1b[1;31m^^^\x1b[0m\n args = (1, 2, 3, 4)\n x = {\'a\': {\'b\': None}}\n\x1b[1;35mTypeError\x1b[0m: \x1b[35m\'NoneType\' object is not subscriptable\x1b[0m\n'
49734960 def test_colorized_traceback (self ):
49744961 def foo (* args ):
49754962 x = {'a' :{'b' : None }}
@@ -5002,7 +4989,6 @@ def bar():
50024989 self .assertIn ("return baz1(1,\n 2,3\n ,4)" , lines )
50034990 self .assertIn (red + "bar" + reset + boldr + "()" + reset , lines )
50044991
5005- @unittest .expectedFailure # TODO: RUSTPYTHON; AssertionError: ' File \x1b[35m"<string>"\x1b[0m, line \x1b[35m1\x1b[0m\n a \x1b[1;31m$\x1b[0m b\n \x1b[1;31m^\x1b[0m\n\x1b[1;35mSyntaxError\x1b[0m: \x1b[35minvalid syntax\x1b[0m\n' not found in 'Traceback (most recent call last):\n File \x1b[35m"/Users/al03219714/Projects/RustPython/crates/pylib/Lib/test/test_traceback.py"\x1b[0m, line \x1b[35m4782\x1b[0m, in \x1b[35mtest_colorized_syntax_error\x1b[0m\n \x1b[31mcompile\x1b[0m\x1b[1;31m("a $ b", "<string>", "exec")\x1b[0m\n \x1b[31m~~~~~~~\x1b[0m\x1b[1;31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\x1b[0m\n e = SyntaxError(\'got unexpected token $\')\n self = <test.test_traceback.TestColorizedTraceback testMethod=test_colorized_syntax_error>\n File \x1b[35m"<string>"\x1b[0m, line \x1b[35m1\x1b[0m\n a \x1b[1;31m$\x1b[0m b\n \x1b[1;31m^\x1b[0m\n\x1b[1;35mSyntaxError\x1b[0m: \x1b[35mgot unexpected token $\x1b[0m\n'
50064992 def test_colorized_syntax_error (self ):
50074993 try :
50084994 compile ("a $ b" , "<string>" , "exec" )
@@ -5053,7 +5039,6 @@ def expected(t, m, fn, l, f, E, e, z):
50535039 ]
50545040 self .assertEqual (actual , expected (** colors ))
50555041
5056- @unittest .expectedFailure # TODO: RUSTPYTHON; Diff is 1795 characters long. Set self.maxDiff to None to see it.
50575042 def test_colorized_traceback_from_exception_group (self ):
50585043 def foo ():
50595044 exceptions = []
0 commit comments