| | |
| | | foo = Foo() |
| | | self.assertTrue(self._callFUT(foo.method)) |
| | | |
| | | if PY3: |
| | | def test_function_annotations(self): |
| | | def foo(bar): |
| | | """ """ |
| | | # avoid SyntaxErrors in python2 |
| | | foo.__annotations__.update({'bar': 'baz'}) |
| | | self.assertTrue(self._callFUT(foo)) |
| | | def test_function_annotations(self): |
| | | def foo(bar): |
| | | """ """ |
| | | # avoid SyntaxErrors in python2, this if effectively nop |
| | | getattr(foo, '__annotations__', {}).update({'bar': 'baz'}) |
| | | self.assertTrue(self._callFUT(foo)) |
| | | |
| | | class TestNotted(unittest.TestCase): |
| | | def _makeOne(self, predicate): |