@@ -341,6 +341,8 @@ def test_non_interned_future_from_ast(self):
341341 mod .body [0 ].module = " __future__ " .strip ()
342342 compile (mod , "<test>" , "exec" )
343343
344+ # TODO: RUSTPYTHON
345+ @unittest .expectedFailure
344346 def test_alias (self ):
345347 im = ast .parse ("from bar import y" ).body [0 ]
346348 self .assertEqual (len (im .names ), 1 )
@@ -705,6 +707,8 @@ def test_issue39579_dotted_name_end_col_offset(self):
705707 attr_b = tree .body [0 ].decorator_list [0 ].value
706708 self .assertEqual (attr_b .end_col_offset , 4 )
707709
710+ # TODO: RUSTPYTHON
711+ @unittest .expectedFailure
708712 def test_ast_asdl_signature (self ):
709713 self .assertEqual (ast .withitem .__doc__ , "withitem(expr context_expr, expr? optional_vars)" )
710714 self .assertEqual (ast .GtE .__doc__ , "GtE" )
@@ -714,6 +718,8 @@ def test_ast_asdl_signature(self):
714718 expressions [0 ] = f"expr = { ast .expr .__subclasses__ ()[0 ].__doc__ } "
715719 self .assertCountEqual (ast .expr .__doc__ .split ("\n " ), expressions )
716720
721+ # TODO: RUSTPYTHON
722+ @unittest .expectedFailure
717723 def test_parenthesized_with_feature_version (self ):
718724 ast .parse ('with (CtxManager() as example): ...' , feature_version = (3 , 10 ))
719725 # While advertised as a feature in Python 3.10, this was allowed starting 3.9
@@ -729,6 +735,8 @@ def test_issue40614_feature_version(self):
729735 with self .assertRaises (SyntaxError ):
730736 ast .parse ('f"{x=}"' , feature_version = (3 , 7 ))
731737
738+ # TODO: RUSTPYTHON
739+ @unittest .expectedFailure
732740 def test_assignment_expression_feature_version (self ):
733741 ast .parse ('(x := 0)' , feature_version = (3 , 8 ))
734742 with self .assertRaises (SyntaxError ):
@@ -785,6 +793,8 @@ def test_dump(self):
785793 "lineno=1, col_offset=0, end_lineno=1, end_col_offset=24)], type_ignores=[])"
786794 )
787795
796+ # TODO: RUSTPYTHON; redundant kind for Contant node
797+ @unittest .expectedFailure
788798 def test_dump_indent (self ):
789799 node = ast .parse ('spam(eggs, "and cheese")' )
790800 self .assertEqual (ast .dump (node , indent = 3 ), """\
@@ -947,6 +957,8 @@ def test_iter_fields(self):
947957 self .assertEqual (d .pop ('func' ).id , 'foo' )
948958 self .assertEqual (d , {'keywords' : [], 'args' : []})
949959
960+ # TODO: RUSTPYTHON; redundant kind for Contant node
961+ @unittest .expectedFailure
950962 def test_iter_child_nodes (self ):
951963 node = ast .parse ("spam(23, 42, eggs='leek')" , mode = 'eval' )
952964 self .assertEqual (len (list (ast .iter_child_nodes (node .body ))), 4 )
@@ -1089,6 +1101,8 @@ def test_literal_eval_malformed_dict_nodes(self):
10891101 malformed = ast .Dict (keys = [ast .Constant (1 )], values = [ast .Constant (2 ), ast .Constant (3 )])
10901102 self .assertRaises (ValueError , ast .literal_eval , malformed )
10911103
1104+ # TODO: RUSTPYTHON
1105+ @unittest .expectedFailure
10921106 def test_literal_eval_trailing_ws (self ):
10931107 self .assertEqual (ast .literal_eval (" -1" ), - 1 )
10941108 self .assertEqual (ast .literal_eval ("\t \t -1" ), - 1 )
@@ -1107,6 +1121,8 @@ def test_literal_eval_malformed_lineno(self):
11071121 with self .assertRaisesRegex (ValueError , msg ):
11081122 ast .literal_eval (node )
11091123
1124+ # TODO: RUSTPYTHON
1125+ @unittest .expectedFailure
11101126 def test_literal_eval_syntax_errors (self ):
11111127 with self .assertRaisesRegex (SyntaxError , "unexpected indent" ):
11121128 ast .literal_eval (r'''
@@ -1127,8 +1143,6 @@ def test_bad_integer(self):
11271143 compile (mod , 'test' , 'exec' )
11281144 self .assertIn ("invalid integer value: None" , str (cm .exception ))
11291145
1130- # TODO: RUSTPYTHON
1131- @unittest .expectedFailure
11321146 def test_level_as_none (self ):
11331147 body = [ast .ImportFrom (module = 'time' ,
11341148 names = [ast .alias (name = 'sleep' ,
@@ -1141,13 +1155,15 @@ def test_level_as_none(self):
11411155 exec (code , ns )
11421156 self .assertIn ('sleep' , ns )
11431157
1158+ @unittest .skip ("TODO: RUSTPYTHON; crash" )
11441159 def test_recursion_direct (self ):
11451160 e = ast .UnaryOp (op = ast .Not (), lineno = 0 , col_offset = 0 )
11461161 e .operand = e
11471162 with self .assertRaises (RecursionError ):
11481163 with support .infinite_recursion ():
11491164 compile (ast .Expression (e ), "<test>" , "eval" )
11501165
1166+ @unittest .skip ("TODO: RUSTPYTHON; crash" )
11511167 def test_recursion_indirect (self ):
11521168 e = ast .UnaryOp (op = ast .Not (), lineno = 0 , col_offset = 0 )
11531169 f = ast .UnaryOp (op = ast .Not (), lineno = 0 , col_offset = 0 )
@@ -2295,6 +2311,8 @@ class C:
22952311 cdef = ast .parse (s ).body [0 ]
22962312 self .assertEqual (ast .get_source_segment (s , cdef .body [0 ], padded = True ), s_method )
22972313
2314+ # TODO: RUSTPYTHON
2315+ @unittest .expectedFailure
22982316 def test_source_segment_missing_info (self ):
22992317 s = 'v = 1\r \n w = 1\n x = 1\n \r y = 1\r \n '
23002318 v , w , x , y = ast .parse (s ).body
0 commit comments