Ilja Everilä
2015-02-05 d49949081da1669914ddebb487c87edba3f41000
ugly nop dict update hack for PY2 and coverage
1 files modified
13 ■■■■ changed files
pyramid/tests/test_config/test_util.py 13 ●●●● patch | view | raw | blame | history
pyramid/tests/test_config/test_util.py
@@ -568,13 +568,12 @@
        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):