@@ -344,8 +344,6 @@ def spam(a):
344
344
self .assertEqual (y , 3 )
345
345
346
346
# TODO RustPython,
347
- # seems to be general nesting problem, see
348
- # test_named_expression_scop_10_rp_scope_prob as reference
349
347
@unittest .expectedFailure # TODO RustPython
350
348
def test_named_expression_scope_06 (self ):
351
349
res = [[spam := i for i in range (3 )] for j in range (2 )]
@@ -384,8 +382,6 @@ def eggs(b):
384
382
self .assertEqual (a , 2 )
385
383
386
384
# TODO RustPython,
387
- # seems to be general nesting problem, see
388
- # test_named_expression_scop_10_rp_scope_prob as reference
389
385
@unittest .expectedFailure
390
386
def test_named_expression_scope_10 (self ):
391
387
res = [b := [a := 1 for i in range (2 )] for j in range (2 )]
@@ -394,23 +390,6 @@ def test_named_expression_scope_10(self):
394
390
self .assertEqual (b , [1 , 1 ])
395
391
self .assertEqual (a , 1 )
396
392
397
- # the following test is not from CPyrgon and just as refernce for a common scoping problem of RustPython
398
- @unittest .skip # needs skipping due to weired behaviour
399
- def test_named_expression_scop_10_rp_scope_prob (self ):
400
- def foo ():
401
- rr = 0
402
- def foo0 ():
403
- nonlocal rr
404
- def foo1 ():
405
- nonlocal rr
406
- rr += 42
407
- foo1 ()
408
- foo0 ()
409
- return rr
410
-
411
- self .assertEqual (foo (), 42 )
412
-
413
-
414
393
def test_named_expression_scope_11 (self ):
415
394
res = [j := i for i in range (5 )]
416
395
@@ -550,7 +529,6 @@ def f():
550
529
f ()
551
530
self .assertEqual (GLOBAL_VAR , None )
552
531
553
- @unittest .expectedFailure # TODO RustPython
554
532
def test_named_expression_nonlocal_scope (self ):
555
533
sentinel = object ()
556
534
def f ():
0 commit comments