From 4197f72f3069683d4ebe8f1aabd9fea3a03645c0 2014-01-31 18:46:27 From: Julian Taylor Date: 2014-01-31 18:46:27 Subject: [PATCH] Work around problem in doctest discovery in Python 3.4 with PyQt Closes gh-4892 --- diff --git a/IPython/testing/plugin/ipdoctest.py b/IPython/testing/plugin/ipdoctest.py index ccb900d..0b8e713 100644 --- a/IPython/testing/plugin/ipdoctest.py +++ b/IPython/testing/plugin/ipdoctest.py @@ -116,6 +116,10 @@ class DocTestFinder(doctest.DocTestFinder): return module.__name__ == object.__module__ elif isinstance(object, property): return True # [XX] no way not be sure. + elif inspect.ismethoddescriptor(object): + # Unbound PyQt signals reach this point in Python 3.4b3, and we want + # to avoid throwing an error. See also http://bugs.python.org/issue3158 + return False else: raise ValueError("object must be a class or function, got %r" % object)