diff options
author | dieter <dieter@handshake.de> | 2020-07-05 15:53:09 +0200 |
---|---|---|
committer | dieter <dieter@handshake.de> | 2020-07-05 15:53:09 +0200 |
commit | a09ffdbd2bbfb59a1c2d737c43aba2427f367d16 (patch) | |
tree | 900094647588c31c454ae2cda491acdd10b9d265 | |
parent | c990bcfbc302ad6b13dfe4bd30c6a2a8394186a8 (diff) | |
download | zope-tales-a09ffdbd2bbfb59a1c2d737c43aba2427f367d16.tar.gz |
Python 3 compatibility; test improvement
-rw-r--r-- | src/zope/tales/tests/test_expressions.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/zope/tales/tests/test_expressions.py b/src/zope/tales/tests/test_expressions.py index 2369468..6ff8f52 100644 --- a/src/zope/tales/tests/test_expressions.py +++ b/src/zope/tales/tests/test_expressions.py @@ -392,7 +392,7 @@ class TestParsedExpressions(ExpressionTestBase): from ..expressions import PathExpr, SubPathExpr class MySubPathExpr(SubPathExpr): - ALLOWED_BUILTINS = dict(True=True, False=False) + ALLOWED_BUILTINS = {'True':True, 'False':False, 'x':None} class MyPathExpr(PathExpr): SUBEXPR_FACTORY = MySubPathExpr @@ -408,6 +408,7 @@ class TestParsedExpressions(ExpressionTestBase): self.assertFalse(eval("False")) with self.assertRaises(KeyError): eval("None") + self.assertIsNotNone(eval("x")) # variable before builtin class FunctionTests(ExpressionTestBase): |