コード例 #1
0
ファイル: test_interfaces.py プロジェクト: dtgit/dtedu
 def getImplementsOfInstanceOf(self, klass):
     """ returns the interfaces implemented by the klass (flat)"""
     impl = getImplementsOfInstances(klass)
     if not isinstance(impl, tuple):
         impl = (impl,)
     if impl:
         return flattenInterfaces(impl)
コード例 #2
0
ファイル: testInterfaces.py プロジェクト: dtgit/dtedu
    def getImplementsOfInstanceOf(self, klass):
        """ returns the interfaces implemented by the klass (flat)"""
        from Interface.Implements import getImplementsOfInstances, flattenInterfaces

        impl = getImplementsOfInstances(klass)
        if type(impl) is not TupleType:
            impl = (impl,)
        if impl:
            return flattenInterfaces(impl)