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
00241cdd
Commit
00241cdd
authored
Apr 17, 2012
by
Taddeus Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a basic unit test for strategy (needs to be extended).
parent
5f84e863
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
tests/test_strategy.py
tests/test_strategy.py
+15
-0
No files found.
tests/test_strategy.py
0 → 100644
View file @
00241cdd
from
src.rules.factors
import
match_expand
,
expand_double
,
expand_single
from
src.node
import
Scope
from
src.possibilities
import
Possibility
as
P
from
src.strategy
import
find_possibilities
from
tests.rulestestcase
import
RulesTestCase
,
tree
class
TestStrategy
(
RulesTestCase
):
def
test_find_possibilities_sort
(
self
):
(
ab
,
cd
),
e
=
root
=
tree
(
'(a + b)(c + d)e'
)
self
.
assertEqualPos
(
find_possibilities
(
root
),
[
P
(
root
,
expand_single
,
(
Scope
(
root
),
cd
,
e
)),
P
(
root
,
expand_single
,
(
Scope
(
root
),
ab
,
e
)),
P
(
root
,
expand_double
,
(
Scope
(
root
),
ab
,
cd
))])
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