Browse Source

added test for is_allowed_string returning false, edited test for is_allowed_string returning true by adding a division

remotes/origin/feature/feature-read-math-functions
fdai7763 11 months ago
parent
commit
74284d4d98
  1. 4
      src/test/py/test_read_math_function.py

4
src/test/py/test_read_math_function.py

@ -12,7 +12,9 @@ class read_function(unittest.TestCase):
def test_constant_isstring_false(self):
self.assertEqual(is_string(42), False)
def test_constant_isallowed_string_true(self):
self.assertEqual(is_allowed_string("c", "42^(2)+1-3*4"), True)
self.assertEqual(is_allowed_string("c", "42^(2)+1-3*4/3"), True)
def test_constant_isallowed_string_false(self):
self.assertEqual(is_allowed_string("c", "42^(2)+1-3*4/3x"), False)
if __name__ == '__main__':
unittest.main()
Loading…
Cancel
Save