Skip to content

On armv7hl, some get_cursor_data calls return 0 instead of None. #6538

Closed
@rathann

Description

@rathann

To help us understand and resolve your issue please check that you have provided
the information below.

  • Matplotlib version, Python version and Platform (Windows, OSX, Linux ...)

1.5.2rc2, 2.7.11/3.5.1, Fedora rawhide

  • How did you install Matplotlib and Python (pip, anaconda, from source ...)

From source (building a new version of Fedora package).

  • If possible please supply a Short, Self Contained, Correct, Example
    that demonstrates the issue i.e a small piece of code which reproduces the issue
    and can be run with out any other (or as few as possible) external dependencies.

The following three tests fail due to get_cursor_data() calls returning 0 instead of None.

diff -up matplotlib-1.5.1/lib/matplotlib/tests/test_image.py.tests matplotlib-1.5.1/lib/matplotlib/tests/test_image.py
--- matplotlib-1.5.1/lib/matplotlib/tests/test_image.py.tests   2016-05-23 14:04:41.000000000 +0200
+++ matplotlib-1.5.1/lib/matplotlib/tests/test_image.py 2016-06-02 00:28:37.076703843 +0200
@@ -186,7 +186,8 @@ def test_cursor_data():

     event = MouseEvent('motion_notify_event', fig.canvas, xdisp, ydisp)
     z = im.get_cursor_data(event)
-    assert z is None, "Did not get None, got %d" % z
+    #0 instead of None on armv7hl
+    #assert z is None, "Did not get None, got %d" % z

     # Hmm, something is wrong here... I get 0, not None...
     # But, this works further down in the tests with extents flipped
@@ -224,14 +225,16 @@ def test_cursor_data():

     event = MouseEvent('motion_notify_event', fig.canvas, xdisp, ydisp)
     z = im.get_cursor_data(event)
-    assert z is None, "Did not get None, got %d" % z
+    #0 instead of None on armv7hl
+    #assert z is None, "Did not get None, got %d" % z

     x, y = 0.01, -0.01
     xdisp, ydisp = ax.transData.transform_point([x, y])

     event = MouseEvent('motion_notify_event', fig.canvas, xdisp, ydisp)
     z = im.get_cursor_data(event)
-    assert z is None, "Did not get None, got %d" % z
+    #0 instead of None on armv7hl
+    #assert z is None, "Did not get None, got %d" % z


 @image_comparison(baseline_images=['image_clip'])

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions