diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-01-16 10:53:11 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-01-16 11:20:58 +0100 |
| commit | 68b51b8c9979ceae4367566e476fc50bb5821a05 (patch) | |
| tree | ccc6b07a92bd71fb0704754fa1a7e2ae28ca27b4 | |
| parent | 5b2c26da973db4078040dd998a357f41dc950a59 (diff) | |
Fix some flake8 warnings in the shibokenmodule test
Also remove *-import.
Pick-to: 6.6 6.5
Change-Id: I8988ff328701cc4b1559e84efaba018f87193f28
Reviewed-by: Christian Tismer <tismer@stackless.com>
| -rw-r--r-- | sources/shiboken6/tests/shibokenmodule/module_test.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sources/shiboken6/tests/shibokenmodule/module_test.py b/sources/shiboken6/tests/shibokenmodule/module_test.py index 9b9a5ad90..a1f955752 100644 --- a/sources/shiboken6/tests/shibokenmodule/module_test.py +++ b/sources/shiboken6/tests/shibokenmodule/module_test.py @@ -7,17 +7,19 @@ import unittest from pathlib import Path sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) -from shiboken_paths import init_paths +from shiboken_paths import init_paths # noqa: E402 init_paths() -from shiboken6 import Shiboken -from sample import * +from shiboken6 import Shiboken # noqa: E402 +from sample import BlackBox, ObjectType, ObjectModel, ObjectView, Point # noqa: E402 + class MultipleInherited (ObjectType, Point): def __init__(self): ObjectType.__init__(self) Point.__init__(self) + class TestShiboken(unittest.TestCase): def testIsValid(self): self.assertTrue(Shiboken.isValid(object())) @@ -55,7 +57,7 @@ class TestShiboken(unittest.TestCase): p = ObjectType() obj = ObjectType(p) obj2 = ObjectType(obj) - obj3 = ObjectType(obj) + obj3 = ObjectType(obj) # noqa: F841 self.assertEqual(Shiboken.dump(None), "Ordinary Python type.") Shiboken.dump(obj) @@ -69,9 +71,9 @@ class TestShiboken(unittest.TestCase): # Don't crash even after deleting an object Shiboken.invalidate(obj) - Shiboken.dump(obj) # deleted - Shiboken.dump(p) # child deleted - Shiboken.dump(obj2) # parent deleted + Shiboken.dump(obj) # deleted + Shiboken.dump(p) # child deleted + Shiboken.dump(obj2) # parent deleted def testDelete(self): obj = ObjectType() |
