Skip to content

Commit 875f941

Browse files
committed
Disable a test for Python 3.5 because functools.partial behavior changed in 3.5
1 parent 6e18d47 commit 875f941

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/test_wait_signal.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,8 +840,13 @@ def test_without_callback_and_args(self, qtbot, signaller):
840840
def test_unable_to_get_callback_name(self, qtbot, signaller):
841841
"""
842842
Test that for complicated callbacks which aren't callables, but e.g. double-wrapped partials, the test code
843-
is unable to determine the name of the callback.
843+
is sometimes unable to determine the name of the callback.
844+
Note that this behavior changes with Python 3.5, where a functools.partial() is smart enough to detect wrapped
845+
calls.
844846
"""
847+
if sys.version_info >= (3,5):
848+
pytest.skip("Only on Python 3.4 and lower double-wrapped functools.partial callbacks are a problem")
849+
845850
if qt_api.pytest_qt_api == 'pyside':
846851
signal = (signaller.signal_single_arg, "signal_single_arg(int)")
847852
else:

0 commit comments

Comments
 (0)