forked from arch-master/eBooker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtester.py
35 lines (35 loc) · 959 Bytes
/
tester.py
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
32
33
34
35
import os
import sys
py3 = False
if sys.version_info[0] >= 3:
py3 = True
def get_input(message):
if py3 == True:
return str(input(message))
else:
return raw_input(message)
class Tester(object):
def test(self):
try:
assert os.path.exists("docs/stylesheet.css")
assert os.path.exists("README.md")
assert os.path.exists("docs/index.html")
assert os.path.exists("ebooker.py")
assert os.path.exists("docs")
assert type(self) is Tester
return
except:
print("")
print("An internal error occurred!")
print("Program execution stopped. Type RETURN to exit.")
errorloopBool = True
while errorloopBool:
errorBool = get_input("")
sys.exit(1)
if __name__ == "__main__":
tester = Tester()
try:
tester.test()
except:
sys.exit(1)
sys.exit(0)