aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sources/pyside6/tests/QtCore/errormessages_with_features_test.py9
-rw-r--r--sources/shiboken6/libshiboken/signature/signature.cpp3
2 files changed, 7 insertions, 5 deletions
diff --git a/sources/pyside6/tests/QtCore/errormessages_with_features_test.py b/sources/pyside6/tests/QtCore/errormessages_with_features_test.py
index 8cb38882a..97c4f942e 100644
--- a/sources/pyside6/tests/QtCore/errormessages_with_features_test.py
+++ b/sources/pyside6/tests/QtCore/errormessages_with_features_test.py
@@ -34,7 +34,6 @@ This test is in its own file because combining it with
@unittest.skipIf(is_pypy, "__feature__ cannot yet be used with PyPy")
class ErrormessagesWithFeatures(unittest.TestCase):
probe = "called with wrong argument types"
- probe_miss = "missing signature"
def setUp(self):
qApp or QApplication()
@@ -76,20 +75,20 @@ class ErrormessagesWithFeatures(unittest.TestCase):
with self.assertRaises(TypeError) as cm:
QApplication.quitOnLastWindowClosed = object
print("\n\n" + cm.exception.args[0])
- self.assertTrue(self.probe_miss in cm.exception.args[0])
+ self.assertTrue(self.probe in cm.exception.args[0])
with self.assertRaises(TypeError) as cm:
qApp.quitOnLastWindowClosed = object
- self.assertTrue(self.probe_miss in cm.exception.args[0])
+ self.assertTrue(self.probe in cm.exception.args[0])
def testCorrectErrorMessagesClassSnakeProp(self):
from __feature__ import snake_case, true_property
with self.assertRaises(TypeError) as cm:
QApplication.quit_on_last_window_closed = object
print("\n\n" + cm.exception.args[0])
- self.assertTrue(self.probe_miss in cm.exception.args[0])
+ self.assertTrue(self.probe in cm.exception.args[0])
with self.assertRaises(TypeError) as cm:
qApp.quit_on_last_window_closed = object
- self.assertTrue(self.probe_miss in cm.exception.args[0])
+ self.assertTrue(self.probe in cm.exception.args[0])
def testDocIsWorking(self):
"""
diff --git a/sources/shiboken6/libshiboken/signature/signature.cpp b/sources/shiboken6/libshiboken/signature/signature.cpp
index 814d0ceab..04eb974f0 100644
--- a/sources/shiboken6/libshiboken/signature/signature.cpp
+++ b/sources/shiboken6/libshiboken/signature/signature.cpp
@@ -248,6 +248,9 @@ PyObject *get_signature_intern(PyObject *ob, PyObject *modifier)
return pyside_tp_get___signature__(ob, modifier);
if (Py_TYPE(ob) == &PyWrapperDescr_Type)
return pyside_wd_get___signature__(ob, modifier);
+ // For classmethods we use the simple wrapper description implementation.
+ if (Py_TYPE(ob) == &PyClassMethodDescr_Type)
+ return pyside_wd_get___signature__(ob, modifier);
return nullptr;
}