mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-29 08:49:15 +08:00
io: Add null-plugin to simplify testing.
This commit is contained in:
@@ -9,6 +9,7 @@ from _plugins import available as plugins
|
||||
from _plugins import info as plugin_info
|
||||
|
||||
# Add this plugin so that we can read images by default
|
||||
use_plugin('null')
|
||||
use_plugin('pil')
|
||||
|
||||
from sift import *
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
[null]
|
||||
description = Default plugin that does nothing
|
||||
provides = imshow, _app_show
|
||||
@@ -0,0 +1,15 @@
|
||||
__all__ = ['imshow', '_app_show']
|
||||
|
||||
import warnings
|
||||
|
||||
message = '''\
|
||||
No plugin has been loaded. Please refer to
|
||||
|
||||
scikits.image.io.plugins()
|
||||
|
||||
for a list of available plugins.'''
|
||||
|
||||
def imshow(*args, **kwargs):
|
||||
warnings.warn(RuntimeWarning(message))
|
||||
|
||||
_app_show = imshow
|
||||
Reference in New Issue
Block a user