Commit 406d6ce7 authored by Guido van Rossum's avatar Guido van Rossum

Add dummy versions (how appropriate :-) of the APIs getCompilerError()

and setPosition(), to make more of the tests succeed.
parent 63d108ec
...@@ -98,8 +98,13 @@ Default = [] ...@@ -98,8 +98,13 @@ Default = []
name_match = re.compile(r"(?s)(%s):(.*)\Z" % NAME_RE).match name_match = re.compile(r"(?s)(%s):(.*)\Z" % NAME_RE).match
class CompilerError(Exception):
pass
class DummyEngine: class DummyEngine:
position = None
def __init__(self, macros=None): def __init__(self, macros=None):
if macros is None: if macros is None:
macros = {} macros = {}
...@@ -108,6 +113,12 @@ class DummyEngine: ...@@ -108,6 +113,12 @@ class DummyEngine:
self.locals = self.globals = dict self.locals = self.globals = dict
self.stack = [dict] self.stack = [dict]
def getCompilerError(self):
return CompilerError
def setPosition(self, position):
self.position = position
def compile(self, expr): def compile(self, expr):
return "$%s$" % expr return "$%s$" % expr
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment