-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtests.py
More file actions
28 lines (20 loc) · 747 Bytes
/
tests.py
File metadata and controls
28 lines (20 loc) · 747 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
import unittest
from functions.get_file_content import get_file_content
from functions.get_files_info import get_files_info
from functions.write_file import write_file
from functions.run_python_file import run_python_file
class TestCalculator(unittest.TestCase):
def test_main(self):
result = run_python_file("calculator", "main.py")
print(result)
def test_tests(self):
result = run_python_file("calculator", "tests.py")
print(result)
def test_cd(self):
result = run_python_file("calculator", "../main.py")
print(result)
def test_non(self):
result = run_python_file("calculator", "nonexistent.py")
print(result)
if __name__ == "__main__":
unittest.main()