summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_scope.py
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2021-06-08 12:17:55 (GMT)
committerGitHub <noreply@github.com>2021-06-08 12:17:55 (GMT)
commit3fe921cd49959181163671364c8b84faa88f7895 (patch)
tree939bcd1d318405affab0df79ffe650c1565565af /Lib/test/test_scope.py
parent781dc76577b1810666f4ce04d8fc20d8b43fb374 (diff)
downloadcpython-3fe921cd49959181163671364c8b84faa88f7895.zip
cpython-3fe921cd49959181163671364c8b84faa88f7895.tar.gz
cpython-3fe921cd49959181163671364c8b84faa88f7895.tar.bz2
Revert "bpo-43693: Add the MAKE_CELL opcode and interleave fast locals offsets. (gh-26396)" (GH-26597)
This reverts commit 631f9938b1604d4f893417ec339b9e0fa9196fb1.
Diffstat (limited to 'Lib/test/test_scope.py')
-rw-r--r--Lib/test/test_scope.py51
1 files changed, 0 insertions, 51 deletions
diff --git a/Lib/test/test_scope.py b/Lib/test/test_scope.py
index 29d60ff..4239b26 100644
--- a/Lib/test/test_scope.py
+++ b/Lib/test/test_scope.py
@@ -176,57 +176,6 @@ class ScopeTests(unittest.TestCase):
self.assertEqual(foo(a=42), 50)
self.assertEqual(foo(), 25)
- def testCellIsArgAndEscapes(self):
- # We need to be sure that a cell passed in as an arg still
- # gets wrapped in a new cell if the arg escapes into an
- # inner function (closure).
-
- def external():
- value = 42
- def inner():
- return value
- cell, = inner.__closure__
- return cell
- cell_ext = external()
-
- def spam(arg):
- def eggs():
- return arg
- return eggs
-
- eggs = spam(cell_ext)
- cell_closure, = eggs.__closure__
- cell_eggs = eggs()
-
- self.assertIs(cell_eggs, cell_ext)
- self.assertIsNot(cell_eggs, cell_closure)
-
- def testCellIsLocalAndEscapes(self):
- # We need to be sure that a cell bound to a local still
- # gets wrapped in a new cell if the local escapes into an
- # inner function (closure).
-
- def external():
- value = 42
- def inner():
- return value
- cell, = inner.__closure__
- return cell
- cell_ext = external()
-
- def spam(arg):
- cell = arg
- def eggs():
- return cell
- return eggs
-
- eggs = spam(cell_ext)
- cell_closure, = eggs.__closure__
- cell_eggs = eggs()
-
- self.assertIs(cell_eggs, cell_ext)
- self.assertIsNot(cell_eggs, cell_closure)
-
def testRecursion(self):
def f(x):