Skip to content

Commit 3b68321

Browse files
committed
Merge branch 'master' into coolreader18/constant-strings
2 parents 4517527 + f284b4c commit 3b68321

File tree

6 files changed

+891
-32
lines changed

6 files changed

+891
-32
lines changed

Lib/test/test_named_expression.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,6 @@ def spam(a):
344344
self.assertEqual(y, 3)
345345

346346
# TODO RustPython,
347-
# seems to be general nesting problem, see
348-
# test_named_expression_scop_10_rp_scope_prob as reference
349347
@unittest.expectedFailure # TODO RustPython
350348
def test_named_expression_scope_06(self):
351349
res = [[spam := i for i in range(3)] for j in range(2)]
@@ -384,8 +382,6 @@ def eggs(b):
384382
self.assertEqual(a, 2)
385383

386384
# TODO RustPython,
387-
# seems to be general nesting problem, see
388-
# test_named_expression_scop_10_rp_scope_prob as reference
389385
@unittest.expectedFailure
390386
def test_named_expression_scope_10(self):
391387
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):
394390
self.assertEqual(b, [1, 1])
395391
self.assertEqual(a, 1)
396392

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-
414393
def test_named_expression_scope_11(self):
415394
res = [j := i for i in range(5)]
416395

@@ -550,7 +529,6 @@ def f():
550529
f()
551530
self.assertEqual(GLOBAL_VAR, None)
552531

553-
@unittest.expectedFailure # TODO RustPython
554532
def test_named_expression_nonlocal_scope(self):
555533
sentinel = object()
556534
def f():

0 commit comments

Comments
 (0)