-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetupOld.py
23 lines (17 loc) · 941 Bytes
/
setupOld.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os
import sys
import unittest
class TestSetup(unittest.TestCase):
def testWriteInPath(self):
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), './code')))
print("\n\n================ Project interpreter PATH folders (for modules) ================")
for PathName in sys.path:
print(PathName)
print("================================================================================\n\n")
self.assertIn(str(os.path.abspath(os.path.join(os.path.dirname(__file__), './code'))), sys.path,
"The path containing the code files was not added.")
def testPathExists(self):
self.assertTrue(os.path.exists(str(os.path.abspath(os.path.join(os.path.dirname(__file__), './code')))),
"Path does not exist, please name your folder containing the code, 'code'")
if __name__ == '__main__':
unittest.main()