aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/pysidetest/enum_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/tests/pysidetest/enum_test.py')
-rw-r--r--sources/pyside6/tests/pysidetest/enum_test.py41
1 files changed, 29 insertions, 12 deletions
diff --git a/sources/pyside6/tests/pysidetest/enum_test.py b/sources/pyside6/tests/pysidetest/enum_test.py
index 832834530..7afc5b948 100644
--- a/sources/pyside6/tests/pysidetest/enum_test.py
+++ b/sources/pyside6/tests/pysidetest/enum_test.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2022 The Qt Company Ltd.
+# Copyright (C) 2024 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
import os
@@ -50,6 +50,8 @@ class ListConnectionTest(unittest.TestCase):
# PYSIDE-1735: We are testing that opcodes do what they are supposed to do.
# This is needed in the PyEnum forgiveness mode where we need
# to introspect the code if an Enum was called with no args.
+
+# flake8: noqa
class InvestigateOpcodesTest(unittest.TestCase):
def probe_function1(self):
@@ -162,25 +164,40 @@ class InvestigateOpcodesTest(unittest.TestCase):
self.assertEqual(self.read_code(self.probe_function2, adaptive=True), result_3)
self.assertEqual(self.get_sizes(self.probe_function2, adaptive=True), sizes_3)
- if sys.version_info[:2] >= (3, 12):
+ if sys.version_info[:2] == (3, 12):
- result_1 = [('RESUME', 151, 0),
- ('LOAD_GLOBAL', 116, 0),
- ('LOAD_ATTR', 106, 2),
- ('STORE_FAST', 125, 1),
+ result_1 = [('RESUME', 151, 0),
+ ('LOAD_GLOBAL', 116, 0),
+ ('LOAD_ATTR', 106, 2),
+ ('STORE_FAST', 125, 1),
('RETURN_CONST', 121, 0)]
- result_2 = [('RESUME', 151, 0),
- ('LOAD_GLOBAL', 116, 1),
- ('LOAD_ATTR', 106, 2),
- ('CALL', 171, 0),
- ('STORE_FAST', 125, 1),
+ result_2 = [('RESUME', 151, 0),
+ ('LOAD_GLOBAL', 116, 1),
+ ('LOAD_ATTR', 106, 2),
+ ('CALL', 171, 0),
+ ('STORE_FAST', 125, 1),
('RETURN_CONST', 121, 0)]
+ if sys.version_info[:2] >= (3, 13):
+
+ result_1 = [('RESUME', 149, 0),
+ ('LOAD_GLOBAL', 91, 0),
+ ('LOAD_ATTR', 82, 2),
+ ('STORE_FAST', 110, 1),
+ ('RETURN_CONST', 103, 0)]
+
+ result_2 = [('RESUME', 149, 0),
+ ('LOAD_GLOBAL', 91, 0),
+ ('LOAD_ATTR', 82, 2),
+ ('PUSH_NULL', 34, None),
+ ('CALL', 53, 0),
+ ('STORE_FAST', 110, 1),
+ ('RETURN_CONST', 103, 0)]
+
self.assertEqual(self.read_code(self.probe_function1), result_1)
self.assertEqual(self.read_code(self.probe_function2), result_2)
if __name__ == '__main__':
unittest.main()
-