- U = os.getenv('USER')
- f=open("/tmp/" + U + "/UnitTestsResult", 'a')
- f.write(" --- TEST src/yacsloader: testLoader.py\n")
- suite = unittest.makeSuite(TestLoader)
- result=unittest.TextTestRunner(f, descriptions=1, verbosity=1).run(suite)
- f.close()
+ dir_test = tempfile.mkdtemp(suffix=".yacstest")
+ file_test = os.path.join(dir_test,"UnitTestsResult")
+ with open(file_test, 'a') as f:
+ f.write(" --- TEST src/yacsloader: testLoader.py\n")
+ suite = unittest.makeSuite(TestLoader)
+ result=unittest.TextTestRunner(f, descriptions=1, verbosity=1).run(suite)