From 49e4807a8df03585c408b94741fe59be0489b2d4 Mon Sep 17 00:00:00 2001 From: fdai7763 Date: Tue, 23 Jan 2024 23:14:40 +0100 Subject: [PATCH] added test for extraction of a negative constant without 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 7fb7f19..9c7ff35 100644 --- a/src/test/py/test_read_math_function.py +++ b/src/test/py/test_read_math_function.py @@ -40,6 +40,8 @@ class read_function(unittest.TestCase): 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"]) + def test_extraction_linear_function_constant_without_math_operators_subtraction(self): + self.assertEqual(extract_constant("42x-5"), ["-5", "42x"]) if __name__ == '__main__': unittest.main()