From e70587d7150942476493ccc356bd1f2781f9e998 Mon Sep 17 00:00:00 2001 From: fdai7763 Date: Tue, 23 Jan 2024 23:33:16 +0100 Subject: [PATCH] added test for extracting constant with math operators --- src/test/py/test_read_math_function.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/py/test_read_math_function.py b/src/test/py/test_read_math_function.py index d2ff9e2..90a890f 100644 --- a/src/test/py/test_read_math_function.py +++ b/src/test/py/test_read_math_function.py @@ -44,6 +44,8 @@ class read_function(unittest.TestCase): self.assertEqual(extract_constant("42x-5"), ["-5", "42x"]) def test_extraction_linear_function_no_constant(self): self.assertEqual(extract_constant("42x"), ["0", "42x"]) + 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"]) if __name__ == '__main__': unittest.main()