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
8499b851
Commit
8499b851
authored
Feb 20, 2012
by
Taddeus Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed possibilities unit tests.
parent
569d321d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
tests/test_possibilities.py
tests/test_possibilities.py
+3
-3
No files found.
tests/test_possibilities.py
View file @
8499b851
...
@@ -45,7 +45,7 @@ class TestPossibilities(unittest.TestCase):
...
@@ -45,7 +45,7 @@ class TestPossibilities(unittest.TestCase):
possibilities
=
parser
.
parser
.
possibilities
possibilities
=
parser
.
parser
.
possibilities
self
.
assertEqual
(
'
\
n
'
.
join
([
repr
(
pos
)
for
pos
in
possibilities
]),
self
.
assertEqual
(
'
\
n
'
.
join
([
repr
(
pos
)
for
pos
in
possibilities
]),
'<Possibility root="3 + 4" handler=add_numerics'
\
'<Possibility root="3 + 4" handler=add_numerics'
\
' args=(<Scope of "3 + 4">, 3, 4
, 3, 4
)>'
)
' args=(<Scope of "3 + 4">, 3, 4)>'
)
def
test_multiple_runs
(
self
):
def
test_multiple_runs
(
self
):
parser
=
ParserWrapper
(
Parser
)
parser
=
ParserWrapper
(
Parser
)
...
@@ -53,7 +53,7 @@ class TestPossibilities(unittest.TestCase):
...
@@ -53,7 +53,7 @@ class TestPossibilities(unittest.TestCase):
possibilities
=
parser
.
parser
.
possibilities
possibilities
=
parser
.
parser
.
possibilities
self
.
assertEqual
(
'
\
n
'
.
join
([
repr
(
pos
)
for
pos
in
possibilities
]),
self
.
assertEqual
(
'
\
n
'
.
join
([
repr
(
pos
)
for
pos
in
possibilities
]),
'<Possibility root="1 + 2" handler=add_numerics'
\
'<Possibility root="1 + 2" handler=add_numerics'
\
' args=(<Scope of "1 + 2">, 1, 2
, 1, 2
)>'
)
' args=(<Scope of "1 + 2">, 1, 2)>'
)
# Remove previous possibilities after second run() call.
# Remove previous possibilities after second run() call.
parser
.
run
([
''
,
' '
])
parser
.
run
([
''
,
' '
])
...
@@ -65,7 +65,7 @@ class TestPossibilities(unittest.TestCase):
...
@@ -65,7 +65,7 @@ class TestPossibilities(unittest.TestCase):
possibilities
=
parser
.
parser
.
possibilities
possibilities
=
parser
.
parser
.
possibilities
self
.
assertEqual
(
'
\
n
'
.
join
([
repr
(
pos
)
for
pos
in
possibilities
]),
self
.
assertEqual
(
'
\
n
'
.
join
([
repr
(
pos
)
for
pos
in
possibilities
]),
'<Possibility root="3 + 4" handler=add_numerics'
\
'<Possibility root="3 + 4" handler=add_numerics'
\
' args=(<Scope of "3 + 4">, 3, 4
, 3, 4
)>'
)
' args=(<Scope of "3 + 4">, 3, 4)>'
)
def
test_filter_duplicates
(
self
):
def
test_filter_duplicates
(
self
):
a
,
b
=
ab
=
tree
(
'a + b'
)
a
,
b
=
ab
=
tree
(
'a + b'
)
...
...
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