diff --git a/src/main/py/read_math_function.py b/src/main/py/read_math_function.py index e540758..83f8469 100644 --- a/src/main/py/read_math_function.py +++ b/src/main/py/read_math_function.py @@ -45,3 +45,7 @@ def calculate_constant_string(string): return eval(string) except Exception as e: return f"Fehler bei der Berechnung: {str(e)}" + +def simplify_easy_math_function(type, function): + if type != "v": + return False \ No newline at end of file diff --git a/src/test/py/test_read_math_function.py b/src/test/py/test_read_math_function.py index 5b37c78..978abdc 100644 --- a/src/test/py/test_read_math_function.py +++ b/src/test/py/test_read_math_function.py @@ -32,5 +32,8 @@ class read_function(unittest.TestCase): def test_read_math_function_return5_if_enter_c_5(self, mock_input): self.assertEqual(read_math_function(), 5) + def test_easy_function_wrong_type(self): + self.assertEqual(simplify_easy_math_function("a", "42x"), False) + if __name__ == '__main__': unittest.main()