diff options
| author | Ilja Everilä <saarni@gmail.com> | 2015-02-05 19:58:54 +0200 |
|---|---|---|
| committer | Ilja Everilä <saarni@gmail.com> | 2015-02-05 19:58:54 +0200 |
| commit | 0ccb82204b8d04f8ffeb8b49a94fb77f981d1122 (patch) | |
| tree | fa4e38696a65cf86017ae7dbcbffd89b673973e2 | |
| parent | 561591252bd029981952c5c229f4cf27832d34a1 (diff) | |
| download | pyramid-0ccb82204b8d04f8ffeb8b49a94fb77f981d1122.tar.gz pyramid-0ccb82204b8d04f8ffeb8b49a94fb77f981d1122.tar.bz2 pyramid-0ccb82204b8d04f8ffeb8b49a94fb77f981d1122.zip | |
PY3 only test for function annotations
| -rw-r--r-- | pyramid/tests/test_config/test_util.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pyramid/tests/test_config/test_util.py b/pyramid/tests/test_config/test_util.py index bb61714ae..c9b0e9e9b 100644 --- a/pyramid/tests/test_config/test_util.py +++ b/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 @@ class Test_takes_one_arg(unittest.TestCase): 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 |
