Fixed #18 : Parsing and evaluating Python

This commit is contained in:
2023-05-14 12:12:29 +02:00
parent e41094f908
commit 09a0246420
46 changed files with 2084 additions and 165 deletions
View File
+18
View File
@@ -0,0 +1,18 @@
from base import BaseTest
class TestNonReg1(BaseTest):
def test_i_can_evaluate_python(self, sheerka, user):
res = sheerka.evaluate_user_input("1 + 1", user)
assert len(res) == 1
ret_val = res[0]
assert ret_val.status is True
assert ret_val.value == 2
def test_i_can_evaluate_variable_that_is_not_defined(self, sheerka, user):
res = sheerka.evaluate_user_input("a", user)
assert len(res) == 1
ret_val = res[0]
assert ret_val.status is False