Skip to content

Commit 0b4626f

Browse files
committed
Move test to test_opcache
1 parent 756774e commit 0b4626f

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

Lib/test/test_dict.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,24 +1594,6 @@ def make_pairs():
15941594
self.assertEqual(d.get(key3_3), 44)
15951595
self.assertGreaterEqual(eq_count, 1)
15961596

1597-
def test_store_attr_with_hint(self):
1598-
# gh-133441: Regression test for STORE_ATTR_WITH_HINT bytecode
1599-
class Node:
1600-
def __init__(self):
1601-
self.parents = {}
1602-
1603-
def __setstate__(self, data_dict):
1604-
self.__dict__ = data_dict
1605-
self.parents = {}
1606-
1607-
class Dict(dict):
1608-
pass
1609-
1610-
obj = Node()
1611-
obj.__setstate__({'parents': {}})
1612-
obj.__setstate__({'parents': {}})
1613-
obj.__setstate__(Dict({'parents': {}}))
1614-
16151597

16161598
class CAPITest(unittest.TestCase):
16171599

Lib/test/test_opcache.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,6 +1155,24 @@ class D(dict): pass
11551155
{'a':1, 'b':2}
11561156
)
11571157

1158+
def test_store_attr_with_hint(self):
1159+
# gh-133441: Regression test for STORE_ATTR_WITH_HINT bytecode
1160+
class Node:
1161+
def __init__(self):
1162+
self.parents = {}
1163+
1164+
def __setstate__(self, data_dict):
1165+
self.__dict__ = data_dict
1166+
self.parents = {}
1167+
1168+
class Dict(dict):
1169+
pass
1170+
1171+
obj = Node()
1172+
obj.__setstate__({'parents': {}})
1173+
obj.__setstate__({'parents': {}})
1174+
obj.__setstate__(Dict({'parents': {}}))
1175+
11581176

11591177
if __name__ == "__main__":
11601178
unittest.main()

0 commit comments

Comments
 (0)