@ -1,2 +1,4 @@
def read_constant(type, value):
if type != "c":
value = False
return value
@ -5,6 +5,8 @@ from src.main.py.read_math_function import *
class read_function(unittest.TestCase):
def test_constant_without_calculation(self):
self.assertEqual(read_constant("c", 42), 42)
def test_constant_no_c(self):
self.assertEqual(read_constant("e", "42*e^x"), False)
if __name__ == '__main__':
unittest.main()