Пример #1
0
    def match_does_not_verify(self):

        class BadlyImplementedClass:
            implements(ITestInterface)

        obj = BadlyImplementedClass()
        matcher = Provides(ITestInterface)
        return obj, matcher.match(obj)
Пример #2
0
    def match_does_not_verify(self):

        @implementer(ITestInterface)
        class BadlyImplementedClass:
            pass

        obj = BadlyImplementedClass()
        matcher = Provides(ITestInterface)
        return obj, matcher.match(obj)
Пример #3
0
 def match_does_not_provide(self):
     obj = object()
     matcher = Provides(ITestInterface)
     return obj, matcher.match(obj)
Пример #4
0
 def test_matches(self):
     matcher = Provides(ITestInterface)
     self.assertEqual(None, matcher.match(Implementor()))
Пример #5
0
 def match_does_not_provide(self):
     obj = object()
     matcher = Provides(ITestInterface)
     return obj, matcher.match(obj)
Пример #6
0
 def test_matches(self):
     matcher = Provides(ITestInterface)
     self.assertEqual(None, matcher.match(Implementor()))