Ilja Everilä
2015-02-05 0ccb82204b8d04f8ffeb8b49a94fb77f981d1122
PY3 only test for function annotations
1 files modified
10 ■■■■■ changed files
pyramid/tests/test_config/test_util.py 10 ●●●●● patch | view | raw | blame | history
pyramid/tests/test_config/test_util.py
@@ -1,5 +1,5 @@
import unittest
from pyramid.compat import text_
from pyramid.compat import text_, PY3
class TestPredicateList(unittest.TestCase):
@@ -568,6 +568,14 @@
        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))
class TestNotted(unittest.TestCase):
    def _makeOne(self, predicate):
        from pyramid.config.util import Notted