-# Copyright (C) 2006-2016 CEA/DEN, EDF R&D
+# Copyright (C) 2006-2019 CEA/DEN, EDF R&D
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
if __name__ == '__main__':
import os
U = os.getenv('USER')
- f=open("/tmp/" + U + "/UnitTestsResult", 'a')
- f.write(" --- TEST src/yacsloader: testProgress.py\n")
- suite = unittest.makeSuite(TestEdit)
- result=unittest.TextTestRunner(f, descriptions=1, verbosity=3).run(suite)
- f.close()
+ with open("/tmp/" + U + "/UnitTestsResult", 'a') as f:
+ f.write(" --- TEST src/yacsloader: testProgress.py\n")
+ suite = unittest.makeSuite(TestEdit)
+ result=unittest.TextTestRunner(f, descriptions=1, verbosity=3).run(suite)
sys.exit(not result.wasSuccessful())