@@ -189,14 +189,22 @@ class SymtableTest(unittest.TestCase):
189189 foo = find_block (top , "foo" )
190190 Alias = find_block (top , "Alias" )
191191 GenericAlias = find_block (top , "GenericAlias" )
192- GenericAlias_inner = find_block (GenericAlias , "GenericAlias" )
192+ # TODO(RUSTPYTHON)
193+ # GenericAlias_inner = find_block(GenericAlias, "GenericAlias")
193194 generic_spam = find_block (top , "generic_spam" )
194- generic_spam_inner = find_block (generic_spam , "generic_spam" )
195+ # TODO(RUSTPYTHON)
196+ # generic_spam_inner = find_block(generic_spam, "generic_spam")
195197 GenericMine = find_block (top , "GenericMine" )
196- GenericMine_inner = find_block (GenericMine , "GenericMine" )
197- T = find_block (GenericMine , "T" )
198- U = find_block (GenericMine , "U" )
198+ # TODO(RUSTPYTHON)
199+ # GenericMine_inner = find_block(GenericMine, "GenericMine")
200+ # TODO(RUSTPYTHON)
201+ # T = find_block(GenericMine, "T")
202+ # TODO(RUSTPYTHON)
203+ # U = find_block(GenericMine, "U")
199204
205+
206+ # TODO(RUSTPYTHON)
207+ @unittest .expectedFailure
200208 def test_type (self ):
201209 self .assertEqual (self .top .get_type (), "module" )
202210 self .assertEqual (self .Mine .get_type (), "class" )
@@ -214,6 +222,8 @@ def test_type(self):
214222 self .assertEqual (self .T .get_type (), "type variable" )
215223 self .assertEqual (self .U .get_type (), "type variable" )
216224
225+ # TODO(RUSTPYTHON)
226+ @unittest .expectedFailure
217227 def test_id (self ):
218228 self .assertGreater (self .top .get_id (), 0 )
219229 self .assertGreater (self .Mine .get_id (), 0 )
@@ -226,11 +236,15 @@ def test_id(self):
226236 self .assertGreater (self .generic_spam .get_id (), 0 )
227237 self .assertGreater (self .GenericMine .get_id (), 0 )
228238
239+ # TODO(RUSTPYTHON)
240+ @unittest .expectedFailure
229241 def test_optimized (self ):
230242 self .assertFalse (self .top .is_optimized ())
231243
232244 self .assertTrue (self .spam .is_optimized ())
233245
246+ # TODO(RUSTPYTHON)
247+ @unittest .expectedFailure
234248 def test_nested (self ):
235249 self .assertFalse (self .top .is_nested ())
236250 self .assertFalse (self .Mine .is_nested ())
@@ -246,6 +260,8 @@ def test_lineno(self):
246260 self .assertEqual (self .top .get_lineno (), 0 )
247261 self .assertEqual (self .spam .get_lineno (), 14 )
248262
263+ # TODO(RUSTPYTHON)
264+ @unittest .expectedFailure
249265 def test_function_info (self ):
250266 func = self .spam
251267 self .assertEqual (sorted (func .get_parameters ()), ["a" , "b" , "kw" , "var" ])
@@ -254,6 +270,8 @@ def test_function_info(self):
254270 self .assertEqual (sorted (func .get_globals ()), ["bar" , "glob" , "some_assigned_global_var" ])
255271 self .assertEqual (self .internal .get_frees (), ("x" ,))
256272
273+ # TODO(RUSTPYTHON)
274+ @unittest .expectedFailure
257275 def test_globals (self ):
258276 self .assertTrue (self .spam .lookup ("glob" ).is_global ())
259277 self .assertFalse (self .spam .lookup ("glob" ).is_declared_global ())
@@ -266,38 +284,52 @@ def test_globals(self):
266284 self .assertTrue (self .top .lookup ("some_non_assigned_global_var" ).is_global ())
267285 self .assertTrue (self .top .lookup ("some_assigned_global_var" ).is_global ())
268286
287+ # TODO(RUSTPYTHON)
288+ @unittest .expectedFailure
269289 def test_nonlocal (self ):
270290 self .assertFalse (self .spam .lookup ("some_var" ).is_nonlocal ())
271291 self .assertTrue (self .other_internal .lookup ("some_var" ).is_nonlocal ())
272292 expected = ("some_var" ,)
273293 self .assertEqual (self .other_internal .get_nonlocals (), expected )
274294
295+ # TODO(RUSTPYTHON)
296+ @unittest .expectedFailure
275297 def test_local (self ):
276298 self .assertTrue (self .spam .lookup ("x" ).is_local ())
277299 self .assertFalse (self .spam .lookup ("bar" ).is_local ())
278300 # Module-scope globals are both global and local
279301 self .assertTrue (self .top .lookup ("some_non_assigned_global_var" ).is_local ())
280302 self .assertTrue (self .top .lookup ("some_assigned_global_var" ).is_local ())
281303
304+ # TODO(RUSTPYTHON)
305+ @unittest .expectedFailure
282306 def test_free (self ):
283307 self .assertTrue (self .internal .lookup ("x" ).is_free ())
284308
309+ # TODO(RUSTPYTHON)
310+ @unittest .expectedFailure
285311 def test_referenced (self ):
286312 self .assertTrue (self .internal .lookup ("x" ).is_referenced ())
287313 self .assertTrue (self .spam .lookup ("internal" ).is_referenced ())
288314 self .assertFalse (self .spam .lookup ("x" ).is_referenced ())
289315
316+ # TODO(RUSTPYTHON)
317+ @unittest .expectedFailure
290318 def test_parameters (self ):
291319 for sym in ("a" , "var" , "kw" ):
292320 self .assertTrue (self .spam .lookup (sym ).is_parameter ())
293321 self .assertFalse (self .spam .lookup ("x" ).is_parameter ())
294322
323+ # TODO(RUSTPYTHON)
324+ @unittest .expectedFailure
295325 def test_symbol_lookup (self ):
296326 self .assertEqual (len (self .top .get_identifiers ()),
297327 len (self .top .get_symbols ()))
298328
299329 self .assertRaises (KeyError , self .top .lookup , "not_here" )
300330
331+ # TODO(RUSTPYTHON)
332+ @unittest .expectedFailure
301333 def test_namespaces (self ):
302334 self .assertTrue (self .top .lookup ("Mine" ).is_namespace ())
303335 self .assertTrue (self .Mine .lookup ("a_method" ).is_namespace ())
@@ -315,13 +347,17 @@ def test_namespaces(self):
315347 self .assertEqual (len (ns_test_2 .get_namespaces ()), 0 )
316348 self .assertRaises (ValueError , ns_test_2 .get_namespace )
317349
350+ # TODO(RUSTPYTHON)
351+ @unittest .expectedFailure
318352 def test_assigned (self ):
319353 self .assertTrue (self .spam .lookup ("x" ).is_assigned ())
320354 self .assertTrue (self .spam .lookup ("bar" ).is_assigned ())
321355 self .assertTrue (self .top .lookup ("spam" ).is_assigned ())
322356 self .assertTrue (self .Mine .lookup ("a_method" ).is_assigned ())
323357 self .assertFalse (self .internal .lookup ("x" ).is_assigned ())
324358
359+ # TODO(RUSTPYTHON)
360+ @unittest .expectedFailure
325361 def test_annotated (self ):
326362 st1 = symtable .symtable ('def f():\n x: int\n ' , 'test' , 'exec' )
327363 st2 = st1 .get_children ()[0 ]
@@ -347,15 +383,21 @@ def test_annotated(self):
347383 ' x: int' ,
348384 'test' , 'exec' )
349385
386+ # TODO(RUSTPYTHON)
387+ @unittest .expectedFailure
350388 def test_imported (self ):
351389 self .assertTrue (self .top .lookup ("sys" ).is_imported ())
352390
391+ # TODO(RUSTPYTHON)
392+ @unittest .expectedFailure
353393 def test_name (self ):
354394 self .assertEqual (self .top .get_name (), "top" )
355395 self .assertEqual (self .spam .get_name (), "spam" )
356396 self .assertEqual (self .spam .lookup ("x" ).get_name (), "x" )
357397 self .assertEqual (self .Mine .get_name (), "Mine" )
358398
399+ # TODO(RUSTPYTHON)
400+ @unittest .expectedFailure
359401 def test_class_get_methods (self ):
360402 self .assertEqual (self .Mine .get_methods (), ('a_method' ,))
361403
@@ -429,6 +471,8 @@ def check_body(body, expected_methods):
429471 check_body ('\n ' .join ((gen , func )), ('genexpr' ,))
430472 check_body ('\n ' .join ((func , gen )), ('genexpr' ,))
431473
474+ # TODO(RUSTPYTHON)
475+ @unittest .expectedFailure
432476 def test_filename_correct (self ):
433477 ### Bug tickler: SyntaxError file name correct whether error raised
434478 ### while parsing or building symbol table.
@@ -460,6 +504,8 @@ def test_single(self):
460504 def test_exec (self ):
461505 symbols = symtable .symtable ("def f(x): return x" , "?" , "exec" )
462506
507+ # TODO(RUSTPYTHON)
508+ @unittest .expectedFailure
463509 def test_bytes (self ):
464510 top = symtable .symtable (TEST_CODE .encode ('utf8' ), "?" , "exec" )
465511 self .assertIsNotNone (find_block (top , "Mine" ))
@@ -469,10 +515,14 @@ def test_bytes(self):
469515 top = symtable .symtable (code , "?" , "exec" )
470516 self .assertIsNotNone (find_block (top , "\u017d " ))
471517
518+ # TODO(RUSTPYTHON)
519+ @unittest .expectedFailure
472520 def test_symtable_repr (self ):
473521 self .assertEqual (str (self .top ), "<SymbolTable for module ?>" )
474522 self .assertEqual (str (self .spam ), "<Function SymbolTable for spam in ?>" )
475523
524+ # TODO(RUSTPYTHON)
525+ @unittest .expectedFailure
476526 def test_symbol_repr (self ):
477527 self .assertEqual (repr (self .spam .lookup ("glob" )),
478528 "<symbol 'glob': GLOBAL_IMPLICIT, USE>" )
@@ -489,6 +539,8 @@ def test_symbol_repr(self):
489539 self .assertEqual (repr (self .other_internal .lookup ("some_var" )),
490540 "<symbol 'some_var': FREE, USE|DEF_NONLOCAL|DEF_LOCAL>" )
491541
542+ # TODO(RUSTPYTHON)
543+ @unittest .expectedFailure
492544 def test_symtable_entry_repr (self ):
493545 expected = f"<symtable entry top({ self .top .get_id ()} ), line { self .top .get_lineno ()} >"
494546 self .assertEqual (repr (self .top ._table ), expected )
@@ -497,6 +549,8 @@ def test_symtable_entry_repr(self):
497549class CommandLineTest (unittest .TestCase ):
498550 maxDiff = None
499551
552+ # TODO(RUSTPYTHON)
553+ @unittest .expectedFailure
500554 def test_file (self ):
501555 filename = os_helper .TESTFN
502556 self .addCleanup (os_helper .unlink , filename )
@@ -514,6 +568,8 @@ def test_file(self):
514568 self .assertIn (" local symbol 'spam': def_local" , lines )
515569 self .assertIn (" symbol table for function 'spam':" , lines )
516570
571+ # TODO(RUSTPYTHON)
572+ @unittest .expectedFailure
517573 def test_stdin (self ):
518574 with support .captured_stdin () as stdin :
519575 stdin .write (TEST_CODE )
0 commit comments