summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-11-27 14:12:47 (GMT)
committerGitHub <noreply@github.com>2018-11-27 14:12:47 (GMT)
commit1005c84535191a72ebb7587d8c5636a065b7ed79 (patch)
treea5c6672e5a207440935066aff09accd8cfa24615 /Lib/test
parent480833808e918a1dcebbbcfd07d5a8de3c5c2a66 (diff)
downloadcpython-1005c84535191a72ebb7587d8c5636a065b7ed79.zip
cpython-1005c84535191a72ebb7587d8c5636a065b7ed79.tar.gz
cpython-1005c84535191a72ebb7587d8c5636a065b7ed79.tar.bz2
bpo-34100: Partially revert merge_consts_recursive() (GH-10743)
Partically revert commit c2e1607a51d7a17f143b5a34e8cff7c6fc58a091 to fix a reference leak.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_compile.py10
1 files changed, 0 insertions, 10 deletions
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
index 58bd9b5..a086ef6 100644
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -615,16 +615,6 @@ if 1:
self.check_constant(f1, Ellipsis)
self.assertEqual(repr(f1()), repr(Ellipsis))
- # Merge constants in tuple or frozenset
- # NOTE: frozenset can't reuse previous const, but frozenset
- # item can be reused later.
- f3 = lambda x: x in {("not a name",)}
- f1, f2 = lambda: "not a name", lambda: ("not a name",)
- self.assertIs(next(iter(f3.__code__.co_consts[1])),
- f2.__code__.co_consts[1])
- self.assertIs(f1.__code__.co_consts[1],
- f2.__code__.co_consts[1][0])
-
# {0} is converted to a constant frozenset({0}) by the peephole
# optimizer
f1, f2 = lambda x: x in {0}, lambda x: x in {0}