X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=test.hdfs%2Ftest_hdf.py;h=8911735b3efc61040c90c8799e33acecd664515f;hb=125e977780564b5313585d13f48d3e26f50ce27a;hp=4a08b4089b7dd589dbf7e5235dec34aca64a071d;hpb=06e7f5859095193fc7f498bd89a7d28009794f53;p=modules%2Fshaper.git diff --git a/test.hdfs/test_hdf.py b/test.hdfs/test_hdf.py index 4a08b4089..8911735b3 100644 --- a/test.hdfs/test_hdf.py +++ b/test.hdfs/test_hdf.py @@ -64,6 +64,10 @@ class TestHDF(unittest.TestCase): self.session.setActiveDocument(self.partSet) self.session.finishOperation() + # Check that the features are not in error + Part_1_doc = aPart.partDoc() + + model.checkFeaturesValidity(Part_1_doc) # check reference data exec(open(self.reffile, "rb").read(), globals(), aPartsList) @@ -75,11 +79,16 @@ if __name__ == "__main__": TestHDF.reffile = sys.argv[2] if len(sys.argv) > 3: errFile = open(sys.argv[3], 'w') + else: + # to ease debugging, display the log in embedded python console if no log file is provided + # when calling salome in command line for instance + # runSalome.py --splash 0 test_hdf.py args:BearingSeparator.hdf,BearingSeparator.py + errFile = None aTest = unittest.TestLoader().loadTestsFromTestCase(TestHDF) unittest.TextTestRunner(stream=errFile).run(aTest) - errFile.close() - #import qtsalome - #qtsalome.qApp.closeAllWindows() - import signal - os.kill(os.getpid(),signal.SIGKILL) + if errFile: + errFile.close() + + # Quit SALOME the clean way + sys.exit()