import os, unittest def main(): #set up p4root directory if os.path.exists('p4root'): pass else: os.mkdir('p4root') cwd = os.getcwd() loader = unittest.TestLoader() #finds all the tests from test_cases directory #it looks for "test*.py" by default tests = loader.discover(os.path.join(cwd,'test_cases')) #runs all test cases unittest.TextTestRunner(verbosity=2).run(tests) if __name__ == '__main__': main()
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#5 | 8701 | Stephen Moon | Added a routine to create p4root directory | ||
#4 | 8682 | Stephen Moon | Added comments about what is happening | ||
#3 | 8677 | Stephen Moon | Removed the debug lines | ||
#2 | 8671 | Stephen Moon | Now able to pass p4 library object to the test suite | ||
#1 | 8670 | Stephen Moon | Rearranging of the directory path for workflow | ||
//guest/stephen_moon/smoon/scripts/py_progs/p4_unit/run_suite.py | |||||
#2 | 8667 | Stephen Moon | Changing the discovery path | ||
#1 | 8665 | Stephen Moon | The initial version of test suite |