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