enthought / enthought/enable

Test fails with celiagg backend on windows

Open
#853 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
97
Forks
45
PR merge metrics
No merged PRs in 30d

Description

Running the `enable` testsuite after setting `ETS_TOOLKIT="qt.celiagg"` makes one test fail. Note that this failure isn't observed with the agg backend.

```
======================================================================
ERROR: test_bad_image_shape (enable.tests.test_kiva_graphics_context.TestGCErrors)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\rporuri\.edm\envs\enable-test\lib\site-packages\PIL\Image.py", line 2749, in fromarray
mode, rawmode = _fromarray_typemap[typekey]
KeyError: ((1, 1, 1), '|u1')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\rporuri\.edm\envs\enable-test\lib\site-packages\enable\tests\test_kiva_graphics_context.py", line 25, in test_bad_image_shape
self.assertRaises(ValueError, gc.draw_image, arr.reshape(2, 2, 1))
File "C:\Users\rporuri\.edm\envs\enable-test\lib\unittest\case.py", line 733, in assertRaises
return context.handle('assertRaises', args, kwargs)
File "C:\Users\rporuri\.edm\envs\enable-test\lib\unittest\case.py", line 178, in handle
callable_obj(*args, **kwargs)
File "C:\Users\rporuri\.edm\envs\enable-test\lib\site-packages\kiva\celiagg.py", line 584, in draw_image
img = Image.fromarray(img)
File "C:\Users\rporuri\.edm\envs\enable-test\lib\site-packages\PIL\Image.py", line 2751, in fromarray
raise TypeError("Cannot handle this data type: %s, %s" % typekey) from e
TypeError: Cannot handle this data type: (1, 1, 1), |u1
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.