diff options
Diffstat (limited to 'sources/shiboken6/tests/samplebinding/static_nonstatic_methods_test.py')
-rw-r--r-- | sources/shiboken6/tests/samplebinding/static_nonstatic_methods_test.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sources/shiboken6/tests/samplebinding/static_nonstatic_methods_test.py b/sources/shiboken6/tests/samplebinding/static_nonstatic_methods_test.py index e176b3347..cf0889299 100644 --- a/sources/shiboken6/tests/samplebinding/static_nonstatic_methods_test.py +++ b/sources/shiboken6/tests/samplebinding/static_nonstatic_methods_test.py @@ -15,16 +15,20 @@ init_paths() from sample import SimpleFile + class SimpleFile2 (SimpleFile): def exists(self): return "Mooo" + class SimpleFile3 (SimpleFile): pass + class SimpleFile4 (SimpleFile): exists = 5 + class StaticNonStaticMethodsTest(unittest.TestCase): '''Test cases for overloads involving static and non-static versions of a method.''' @@ -79,9 +83,9 @@ class StaticNonStaticMethodsTest(unittest.TestCase): def testDuckPunchingStaticNonStaticMethod(self): f = SimpleFile(os.fspath(self.existing_filename)) - f.exists = lambda : "Meee" + f.exists = lambda: "Meee" self.assertEqual(f.exists(), "Meee") + if __name__ == '__main__': unittest.main() - |