forked from Rust-related/RustPython
removed extraneous test case, which is covered by test_scope.py
This commit is contained in:
@@ -344,8 +344,6 @@ print(a)"""
|
||||
self.assertEqual(y, 3)
|
||||
|
||||
# TODO RustPython,
|
||||
# seems to be general nesting problem, see
|
||||
# test_named_expression_scop_10_rp_scope_prob as reference
|
||||
@unittest.expectedFailure # TODO RustPython
|
||||
def test_named_expression_scope_06(self):
|
||||
res = [[spam := i for i in range(3)] for j in range(2)]
|
||||
@@ -384,8 +382,6 @@ print(a)"""
|
||||
self.assertEqual(a, 2)
|
||||
|
||||
# TODO RustPython,
|
||||
# seems to be general nesting problem, see
|
||||
# test_named_expression_scop_10_rp_scope_prob as reference
|
||||
@unittest.expectedFailure
|
||||
def test_named_expression_scope_10(self):
|
||||
res = [b := [a := 1 for i in range(2)] for j in range(2)]
|
||||
@@ -394,23 +390,6 @@ print(a)"""
|
||||
self.assertEqual(b, [1, 1])
|
||||
self.assertEqual(a, 1)
|
||||
|
||||
# the following test is not from CPython and just as refernce for a common scoping problem of RustPython
|
||||
def test_named_expression_scop_10_rp_scope_prob(self):
|
||||
def foo():
|
||||
rr=36
|
||||
def foo0():
|
||||
nonlocal rr
|
||||
def foo1():
|
||||
nonlocal rr
|
||||
self.assertEqual(rr,36)
|
||||
rr+=42
|
||||
foo1()
|
||||
foo0()
|
||||
return rr
|
||||
|
||||
self.assertEqual(foo(), 78)
|
||||
|
||||
|
||||
def test_named_expression_scope_11(self):
|
||||
res = [j := i for i in range(5)]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user