-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtests.py
More file actions
31 lines (24 loc) · 663 Bytes
/
Copy pathtests.py
File metadata and controls
31 lines (24 loc) · 663 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from functions.run_python_file import run_python_file
def test():
result = run_python_file("calculator", "main.py")
print("Case 1")
print(result)
print("")
result = run_python_file("calculator", "main.py", ["3 + 5"])
print("Case 2")
print(result)
print("")
result = run_python_file("calculator", "tests.py")
print("Case 3")
print(result)
print("")
result = run_python_file("calculator", "../main.py")
print("Case 4")
print(result)
print("")
result = run_python_file("calculator", "nonexistent.py")
print("Case 5")
print(result)
print("")
if __name__ == "__main__":
test()