]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Correct processing of errors while HDF reading
authorazv <azv@opencascade.com>
Mon, 22 Apr 2019 11:06:06 +0000 (14:06 +0300)
committerazv <azv@opencascade.com>
Mon, 22 Apr 2019 11:06:06 +0000 (14:06 +0300)
test.hdfs/test_hdf.py

index 0294d1b65f05702f040bbdc9aee5185ddfc62d60..5aafa9a4147053db8e3abbaf96f9887a52f765d5 100644 (file)
@@ -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")