diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-11-28 10:56:58 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-11-28 11:43:03 +0100 |
| commit | ea5ce2e4080a99c43b9a330e34588fb1f25c7e45 (patch) | |
| tree | 603f71391656bfde3690fe18b916cd4bf0ef2ad1 /sources/pyside6/tests/pysidetest/enum_test.py | |
| parent | 3ad6f139ddd792b24e8c15c847f3e5db3eac3bf3 (diff) | |
Tests: Fix some flake warnings
Mostly spacing related.
Pick-to: 6.6
Change-Id: I748a8a06f456c5d4bafb94c397c43b3b2ee9e3e9
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/pyside6/tests/pysidetest/enum_test.py')
| -rw-r--r-- | sources/pyside6/tests/pysidetest/enum_test.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sources/pyside6/tests/pysidetest/enum_test.py b/sources/pyside6/tests/pysidetest/enum_test.py index 189ef60c1..832834530 100644 --- a/sources/pyside6/tests/pysidetest/enum_test.py +++ b/sources/pyside6/tests/pysidetest/enum_test.py @@ -15,6 +15,7 @@ from testbinding import Enum1, TestObjectWithoutNamespace import dis + class ListConnectionTest(unittest.TestCase): def testEnumVisibility(self): @@ -45,6 +46,7 @@ class ListConnectionTest(unittest.TestCase): self.assertFalse(Qt.AlignBottom < Qt.AlignHCenter) self.assertTrue(Qt.AlignBottom > Qt.AlignHCenter) + # 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. @@ -69,6 +71,7 @@ class InvestigateOpcodesTest(unittest.TestCase): return sorted(res, key=lambda x: (x[1], x[0])) _sin = sys.implementation.name + @unittest.skipIf(hasattr(sys.flags, "nogil"), f"{_sin} has different opcodes") def testByteCode(self): import dis @@ -134,7 +137,7 @@ class InvestigateOpcodesTest(unittest.TestCase): for _ in range(times): f() - code_quicken(self.probe_function2, QUICKENING_WARMUP_DELAY-1) + code_quicken(self.probe_function2, QUICKENING_WARMUP_DELAY - 1) self.assertEqual(self.read_code(self.probe_function2, adaptive=True), result_2) self.assertEqual(self.get_sizes(self.probe_function2, adaptive=True), sizes_2) @@ -174,7 +177,6 @@ class InvestigateOpcodesTest(unittest.TestCase): ('STORE_FAST', 125, 1), ('RETURN_CONST', 121, 0)] - self.assertEqual(self.read_code(self.probe_function1), result_1) self.assertEqual(self.read_code(self.probe_function2), result_2) |
