|
|
@ -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() |