-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtests.py
More file actions
28 lines (26 loc) · 1.08 KB
/
tests.py
File metadata and controls
28 lines (26 loc) · 1.08 KB
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
from functions.get_files_info import get_files_info
from functions.get_file_content import get_file_content
from functions.write_file import write_file
from functions.run_python import run_python_file
'''
#get_files_info("/home/xer01ne/", "Downloads")
print(get_files_info("calculator", "."))
print(get_files_info("calculator", "pkg"))
print(get_files_info("calculator", "/bin"))
print(get_files_info("calculator", "../"))
'''
'''
#print(get_file_content("calculator", "lorem.txt"))
print(get_file_content("calculator", "main.py"))
print(get_file_content("calculator", "pkg/calculator.py"))
print(get_file_content("calculator", "/bin/cat"))
'''
'''
print(write_file("calculator", "lorem.txt", "wait, this isn't lorem ipsum")
+ write_file("calculator", "pkg/morelorem.txt", "lorem ipsum dolor sit amet")
+ write_file("calculator", "/tmp/temp.txt", "this should not be allowed"))
'''
print(run_python_file("calculator", "main.py")
+ run_python_file("calculator", "tests.py")
+ run_python_file("calculator", "../main.py")
+ run_python_file("calculator", "nonexistent.py"))