Commit 144bf670 authored by Taddeus Kroes's avatar Taddeus Kroes

Fixed unit tests for powers rules.

parent e6d56762
......@@ -162,7 +162,7 @@ MESSAGES[duplicate_exponent] = _('Duplicate the exponent {2}.')
def match_remove_negative_exponent(node):
"""
a^-p -> 1 / a^p
a ^ -p -> 1 / a ^ p
"""
assert node.is_op(OP_POW)
......
......@@ -132,11 +132,11 @@ class TestRulesPowers(RulesTestCase):
a ** p * b ** p * c ** p)
def test_remove_negative_exponent(self):
a, p, l1 = tree('a,p,1')
root = a ** -p
a, p, l1 = tree('a,-p,1')
root = a ** p
self.assertEqualNodes(remove_negative_exponent(root, (a, p)),
l1 / a ** p)
l1 / a ** +p)
def test_exponent_to_root(self):
a, n, m, l1 = tree('a,n,m,1')
......
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