示例#1
0
    def missing_name_test(self):
        class Missing:
            features = ('foo')

            def get_data(self):
                pass
        assert_false(pluginsystem._check_plugin(Missing))
示例#2
0
    def missing_features_test(self):
        class Missing:
            name = 'foo'

            def get_data(self):
                pass
        assert_false(pluginsystem._check_plugin(Missing))
示例#3
0
    def missing_features_test(self):
        class Missing:
            name = 'foo'

            def get_data(self):
                pass

        assert_false(pluginsystem._check_plugin(Missing))
示例#4
0
    def missing_name_test(self):
        class Missing:
            features = ('foo')

            def get_data(self):
                pass

        assert_false(pluginsystem._check_plugin(Missing))
示例#5
0
    def name_wrong_type_test(self):
        class NoName:
            name = ['foo']  # this is not a string
            features = ('foo',)

            def get_data(self):
                pass
        assert_false(pluginsystem._check_plugin(NoName))
示例#6
0
    def features_wrong_type_test(self):
        class NoName:
            name = 'foo'
            features = ('foo')  # this is NOT a tuple!

            def get_data(self):
                pass
        assert_false(pluginsystem._check_plugin(NoName))
示例#7
0
    def empty_name_test(self):
        class NoName:
            name = ''
            features = ('foo',)

            def get_data(self):
                pass
        assert_false(pluginsystem._check_plugin(NoName))
示例#8
0
    def empty_features_test(self):
        class NoFeatures:
            name = 'foo'
            features = ()

            def get_data(self):
                pass
        assert_false(pluginsystem._check_plugin(NoFeatures))
示例#9
0
    def name_wrong_type_test(self):
        class NoName:
            name = ['foo']  # this is not a string
            features = ('foo', )

            def get_data(self):
                pass

        assert_false(pluginsystem._check_plugin(NoName))
示例#10
0
    def features_wrong_type_test(self):
        class NoName:
            name = 'foo'
            features = ('foo')  # this is NOT a tuple!

            def get_data(self):
                pass

        assert_false(pluginsystem._check_plugin(NoName))
示例#11
0
    def empty_name_test(self):
        class NoName:
            name = ''
            features = ('foo', )

            def get_data(self):
                pass

        assert_false(pluginsystem._check_plugin(NoName))
示例#12
0
    def empty_features_test(self):
        class NoFeatures:
            name = 'foo'
            features = ()

            def get_data(self):
                pass

        assert_false(pluginsystem._check_plugin(NoFeatures))
示例#13
0
    def missing_getdata_test(self):
        class Missing:
            name = 'foo'
            features = ('foo', )

        assert_false(pluginsystem._check_plugin(Missing))
示例#14
0
 def missing_getdata_test(self):
     class Missing:
         name = 'foo'
         features = ('foo',)
     assert_false(pluginsystem._check_plugin(Missing))