Skip to content

Instantly share code, notes, and snippets.

@cdeil
Created November 18, 2013 20:07
Show Gist options
  • Save cdeil/7534461 to your computer and use it in GitHub Desktop.
Save cdeil/7534461 to your computer and use it in GitHub Desktop.
Doctest: skimage.viewer.plugins.base.Plugin ... FAIL
Doctest: skimage.viewer.viewers.core.ImageViewer ... FAIL
======================================================================
FAIL: Doctest: skimage.viewer.plugins.base.Plugin
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/doctest.py", line 2154, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for skimage.viewer.plugins.base.Plugin
File "./skimage/viewer/plugins/base.py", line 13, in Plugin
----------------------------------------------------------------------
File "./skimage/viewer/plugins/base.py", line 55, in skimage.viewer.plugins.base.Plugin
Failed example:
plugin = Plugin(image_filter=lambda img, threshold: img > threshold)
Exception raised:
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/doctest.py", line 1287, in __run
compileflags, 1), test.globs)
File "<doctest skimage.viewer.plugins.base.Plugin[3]>", line 1, in <module>
plugin = Plugin(image_filter=lambda img, threshold: img > threshold)
File "./skimage/viewer/plugins/base.py", line 83, in __init__
init_qtapp()
File "./skimage/viewer/utils/core.py", line 39, in init_qtapp
QApp = QtGui.QApplication.instance()
AttributeError: 'module' object has no attribute 'QApplication'
----------------------------------------------------------------------
File "./skimage/viewer/plugins/base.py", line 56, in skimage.viewer.plugins.base.Plugin
Failed example:
plugin += Slider('threshold', 0, 255)
Exception raised:
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/doctest.py", line 1287, in __run
compileflags, 1), test.globs)
File "<doctest skimage.viewer.plugins.base.Plugin[4]>", line 1, in <module>
plugin += Slider('threshold', 0, 255)
NameError: name 'plugin' is not defined
----------------------------------------------------------------------
File "./skimage/viewer/plugins/base.py", line 59, in skimage.viewer.plugins.base.Plugin
Failed example:
viewer = ImageViewer(image)
Exception raised:
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/doctest.py", line 1287, in __run
compileflags, 1), test.globs)
File "<doctest skimage.viewer.plugins.base.Plugin[6]>", line 1, in <module>
viewer = ImageViewer(image)
File "./skimage/viewer/viewers/core.py", line 90, in __init__
utils.init_qtapp()
File "./skimage/viewer/utils/core.py", line 39, in init_qtapp
QApp = QtGui.QApplication.instance()
AttributeError: 'module' object has no attribute 'QApplication'
----------------------------------------------------------------------
File "./skimage/viewer/plugins/base.py", line 60, in skimage.viewer.plugins.base.Plugin
Failed example:
viewer += plugin
Exception raised:
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/doctest.py", line 1287, in __run
compileflags, 1), test.globs)
File "<doctest skimage.viewer.plugins.base.Plugin[7]>", line 1, in <module>
viewer += plugin
NameError: name 'viewer' is not defined
======================================================================
FAIL: Doctest: skimage.viewer.viewers.core.ImageViewer
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/doctest.py", line 2154, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for skimage.viewer.viewers.core.ImageViewer
File "./skimage/viewer/viewers/core.py", line 48, in ImageViewer
----------------------------------------------------------------------
File "./skimage/viewer/viewers/core.py", line 75, in skimage.viewer.viewers.core.ImageViewer
Failed example:
viewer = ImageViewer(image)
Exception raised:
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/doctest.py", line 1287, in __run
compileflags, 1), test.globs)
File "<doctest skimage.viewer.viewers.core.ImageViewer[2]>", line 1, in <module>
viewer = ImageViewer(image)
File "./skimage/viewer/viewers/core.py", line 90, in __init__
utils.init_qtapp()
File "./skimage/viewer/utils/core.py", line 39, in init_qtapp
QApp = QtGui.QApplication.instance()
AttributeError: 'module' object has no attribute 'QApplication'
----------------------------------------------------------------------
Ran 100 tests in 11.991s
FAILED (failures=2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment