|
@ -46,6 +46,8 @@ class read_function(unittest.TestCase): |
|
|
self.assertEqual(extract_constant("42x"), ["0", "42x"]) |
|
|
self.assertEqual(extract_constant("42x"), ["0", "42x"]) |
|
|
def test_extraction_linear_function_constant_with_math_operators(self): |
|
|
def test_extraction_linear_function_constant_with_math_operators(self): |
|
|
self.assertEqual(extract_constant("42x+42^(2)+1-3*4/3"), ["42^(2)+1-3*4/3", "42x"]) |
|
|
self.assertEqual(extract_constant("42x+42^(2)+1-3*4/3"), ["42^(2)+1-3*4/3", "42x"]) |
|
|
|
|
|
def test_easy_function_linear_constant_gets_simplified(self): |
|
|
|
|
|
self.assertEqual(simplify_easy_math_function("v", "42x+42^(2)+1-3*4/3"), [1761, "42x"]) |
|
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
if __name__ == '__main__': |
|
|
unittest.main() |
|
|
unittest.main() |