-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
In testing scikit-image
with current Cython master, we encountered a couple of test failures of the type:
FAILED skimage/io/tests/test_colormixer.py::TestColorMixerAdd::test_basic - TypeError: add() takes exactly 4 positional arguments (5 given)
This seems to be related to the use of a Cython function defined here in a test class which assigns the function as a class attribute.
I assume the 5th argument in the error message above is related to an additional self
argument when called as a bound method? I don't know enough about the low level details of Python classes or Cython to speculate on the reason for this change in behavior.
Changing the test class to explicitly specify that cm.add is a static method as in:
class TestColorMixerAdd(ColorMixerTest):
op = staticmethod(cm.add)
fixes the issue.