示例#1
0
    def test_use_priority(self):
        plugin.use(priority_plugin)
        plug, func = plugin.plugin_store['imread'][0]
        assert_equal(plug, priority_plugin)

        plugin.use('test')
        plug, func = plugin.plugin_store['imread'][0]
        assert_equal(plug, 'test')
示例#2
0
    def test_use_priority(self):
        plugin.use(priority_plugin)
        plug, func = plugin.plugin_store['imread'][0]
        assert_equal(plug, priority_plugin)

        plugin.use('test')
        plug, func = plugin.plugin_store['imread'][0]
        assert_equal(plug, 'test')
示例#3
0
    def test_use_priority(self):
        plugin.use(priority_plugin)
        plug, func = plugin.plugin_store["imread"][0]
        assert_equal(plug, priority_plugin)

        plugin.use("test")
        plug, func = plugin.plugin_store["imread"][0]
        assert_equal(plug, "test")
示例#4
0
    def test_use_priority_with_func(self):
        plugin.use('pil')
        plug, func = plugin.plugin_store['imread'][0]
        assert_equal(plug, 'pil')

        plugin.use('test', 'imread')
        plug, func = plugin.plugin_store['imread'][0]
        assert_equal(plug, 'test')

        plug, func = plugin.plugin_store['imsave'][0]
        assert_equal(plug, 'pil')

        plugin.use('test')
        plug, func = plugin.plugin_store['imsave'][0]
        assert_equal(plug, 'test')
示例#5
0
    def test_use_priority_with_func(self):
        plugin.use('pil')
        plug, func = plugin.plugin_store['imread'][0]
        assert_equal(plug, 'pil')

        plugin.use('test', 'imread')
        plug, func = plugin.plugin_store['imread'][0]
        assert_equal(plug, 'test')

        plug, func = plugin.plugin_store['imsave'][0]
        assert_equal(plug, 'pil')

        plugin.use('test')
        plug, func = plugin.plugin_store['imsave'][0]
        assert_equal(plug, 'test')
示例#6
0
    def test_use_priority_with_func(self):
        plugin.use("pil")
        plug, func = plugin.plugin_store["imread"][0]
        assert_equal(plug, "pil")

        plugin.use("test", "imread")
        plug, func = plugin.plugin_store["imread"][0]
        assert_equal(plug, "test")

        plug, func = plugin.plugin_store["imsave"][0]
        assert_equal(plug, "pil")

        plugin.use("test")
        plug, func = plugin.plugin_store["imsave"][0]
        assert_equal(plug, "test")
示例#7
0
 def test_failed_use(self):
     plugin.use('asd')
示例#8
0
 def test_use(self):
     plugin.use('test')
     plugin.use('test', 'imshow')
示例#9
0
def setup_module(self):
    plugin.use('test')  # see ../_plugins/test_plugin.py
示例#10
0
 def test_failed_use(self):
     plugin.use('asd')
示例#11
0
 def test_use(self):
     plugin.use('test')
     plugin.use('test', 'imshow')
示例#12
0
def setup_module(self):
    plugin.use('test')  # see ../_plugins/test_plugin.py
示例#13
0
def setup_module(self):
    self.backup_plugin_store = deepcopy(plugin.plugin_store)
    plugin.use('test')  # see ../_plugins/test_plugin.py
示例#14
0
def setup_module(self):
    self.backup_plugin_store = deepcopy(plugin.plugin_store)
    plugin.use('test') # see ../_plugins/test_plugin.py
示例#15
0
 def test_failed_use(self):
     plugin.use("asd")
示例#16
0
 def test_use(self):
     plugin.use("test")
     plugin.use("test", "imshow")