Salome HOME
Added python dump checking for every unit test where it is useful.
[modules/shaper.git] / src / ExchangeAPI / Test / TestExchange.py
1 import unittest
2
3 import ModelAPI
4 import ExchangeAPI
5 import model
6
7 class ExchangeTestCase(unittest.TestCase):
8
9     def setUp(self):
10         self.session = ModelAPI.ModelAPI_Session.get()
11         self.doc = self.session.moduleDocument()
12
13     def tearDown(self):
14         assert(model.checkPythonDump())
15         self.session.closeAll()
16
17     def test_addImport(self):
18         self.session.startOperation()
19         self.feature = ExchangeAPI.addImport(self.doc, "file_path")
20         self.session.finishOperation()
21
22     def test_addExport(self):
23         self.session.startOperation()
24         self.feature = ExchangeAPI.exportToFile(self.doc, "file_path", [], "file_format")
25         self.session.finishOperation()
26
27 if __name__ == "__main__":
28     unittest.main()