Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
trs
Commits
24f62cbb
Commit
24f62cbb
authored
Dec 11, 2011
by
Sander Mathijs van Veen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass all given kwargs to the ParserWrapper.
parent
07dc9e8d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
tests/parser.py
tests/parser.py
+4
-4
No files found.
tests/parser.py
View file @
24f62cbb
...
...
@@ -55,8 +55,8 @@ class ParserWrapper(object):
self
.
input_buffer
.
append
(
input
+
'
\
n
'
)
def
run_expressions
(
base_class
,
expressions
,
keepfiles
=
1
,
fail
=
Tru
e
,
silent
=
False
,
verbose
=
0
):
def
run_expressions
(
base_class
,
expressions
,
fail
=
True
,
silent
=
Fals
e
,
**
kwargs
):
"""
Run a list of mathematical expression through the term rewriting system and
check if the output matches the expected output. The list of EXPRESSIONS
...
...
@@ -76,7 +76,7 @@ def run_expressions(base_class, expressions, keepfiles=1, fail=True,
higher value will print more types of debug messages.
"""
parser
=
ParserWrapper
(
base_class
,
keepfiles
=
keepfiles
,
verbose
=
verbose
)
parser
=
ParserWrapper
(
base_class
,
**
kwargs
)
for
exp
,
out
in
expressions
:
res
=
None
...
...
@@ -85,7 +85,7 @@ def run_expressions(base_class, expressions, keepfiles=1, fail=True,
assert
res
==
out
except
:
# pragma: nocover
if
not
silent
:
print
>>
sys
.
stderr
,
'error: %s
=
%s, but expected: %s'
\
print
>>
sys
.
stderr
,
'error: %s
gives
%s, but expected: %s'
\
%
(
exp
,
str
(
res
),
str
(
out
))
if
not
silent
and
hasattr
(
res
,
'nodes'
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment