Skip to content
Snippets Groups Projects
Commit 00241cdd authored by Taddeus Kroes's avatar Taddeus Kroes
Browse files

Added a basic unit test for strategy (needs to be extended).

parent 5f84e863
No related branches found
No related tags found
No related merge requests found
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))])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment