From: azv Date: Mon, 22 Apr 2019 11:06:06 +0000 (+0300) Subject: Correct processing of errors while HDF reading X-Git-Tag: VEDF2019Lot4~101^2~100 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3ea0f691fabb31bc0d49448ab96faab5e0b94439;p=modules%2Fshaper.git Correct processing of errors while HDF reading --- diff --git a/test.hdfs/test_hdf.py b/test.hdfs/test_hdf.py index 0294d1b65..5aafa9a41 100644 --- a/test.hdfs/test_hdf.py +++ b/test.hdfs/test_hdf.py @@ -128,7 +128,7 @@ if __name__ == "__main__": if len(sys.argv) > 2: salomePortFile = sys.argv[2] if len(sys.argv) > 3: - sys.stderr = open(sys.argv[3], 'w') + errFile = open(sys.argv[3], 'w') if len(sys.argv) > 4: salomeKernelDir = sys.argv[4] if len(sys.argv) > 5: @@ -144,7 +144,8 @@ if __name__ == "__main__": dbgFile.close() # =========================================== aTest = unittest.TestLoader().loadTestsFromTestCase(TestHDF) - unittest.TextTestRunner(stream=sys.stderr).run(aTest) + unittest.TextTestRunner(stream=errFile).run(aTest) + errFile.close() # test_program = unittest.main(argv=[sys.argv[0]], exit=False) proc = subprocess.Popen(salomeKernelDir + "/bin/salome/killSalome.py")