scikit-image/scikit-image — pull request #911 by cgohlke (2014-03-11 06:11:59+00:00)
Title: Skip viewer tests if no Qt API is available

Fixes two test errors when PyQt/PySide are not installed:
```
======================================================================
ERROR: Test a line profile using an ndim=2 image
----------------------------------------------------------------------
Traceback (most recent call last):
File "X:\Python34\lib\site-packages\nose\case.py", line 198, in runTest
self.test(*self.arg)
File "X:\Python34\lib\site-packages\skimage\viewer\tests\test_viewer.py", line 17, in test_line_profile
plugin = setup_line_profile(data.camera())
File "X:\Python34\lib\site-packages\skimage\viewer\tests\test_viewer.py", line 9, in setup_line_profile
viewer = ImageViewer(skimage.img_as_float(image))
File "X:\Python34\lib\site-packages\skimage\viewer\viewers\core.py", line 97, in __init__
utils.init_qtapp()
File "X:\Python34\lib\site-packages\skimage\viewer\utils\core.py", line 39, in init_qtapp
QApp = QtGui.QApplication.instance()
AttributeError: 'module' object has no attribute 'QApplication'

======================================================================
ERROR: Test a line profile using an ndim=3 image
----------------------------------------------------------------------
Traceback (most recent call last):
File "X:\Python34\lib\site-packages\nose\case.py", line 198, in runTest
self.test(*self.arg)
File "X:\Python34\lib\site-packages\skimage\viewer\tests\test_viewer.py", line 30, in test_line_profile_rgb
plugin = setup_line_profile(data.chelsea())
File "X:\Python34\lib\site-packages\skimage\viewer\tests\test_viewer.py", line 9, in setup_line_profile
viewer = ImageViewer(skimage.img_as_float(image))
File "X:\Python34\lib\site-packages\skimage\viewer\viewers\core.py", line 97, in __init__
utils.init_qtapp()
File "X:\Python34\lib\site-packages\skimage\viewer\utils\core.py", line 39, in init_qtapp
QApp = QtGui.QApplication.instance()
AttributeError: 'module' object has no attribute 'QApplication'
```