[commit] r1562 - trunk/Tests/GPyUnit
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Thu Sep 29 14:41:20 CDT 2011
Author: ksmyth
Date: Thu Sep 29 14:41:20 2011
New Revision: 1562
Log:
Test for GME-371
Added:
trunk/Tests/GPyUnit/GME_371.py
Modified:
trunk/Tests/GPyUnit/run_tests.py
Added: trunk/Tests/GPyUnit/GME_371.py
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/GPyUnit/GME_371.py Thu Sep 29 14:41:20 2011 (r1562)
@@ -0,0 +1,28 @@
+import unittest
+import os
+
+class TestParser(unittest.TestCase):
+ def test_ParseMetaGME(self):
+ testdir = os.path.dirname(os.path.abspath(__file__))
+ inputfile = testdir + r"\..\..\Paradigms\MetaGME\Paradigm\MetaGME-model.xme"
+ from pythoncom import com_error
+ import win32com.client
+ xme = win32com.client.DispatchEx("Mga.MgaParser")
+ (paradigm, parversion, parguid, basename, ver) = xme.GetXMLInfo(inputfile)
+ mga = win32com.client.DispatchEx("Mga.MgaProject")
+
+ mga.Create("MGA=tmp.mga", paradigm)
+ terr = mga.BeginTransactionInNewTerr()
+ # GME-371: this would crash
+ self.assertRaises(com_error, xme.ParseProject, mga, inputfile)
+ return
+ mga.CommitTransaction()
+ terr.Destroy()
+ mga.Save()
+ mga.Close()
+ del(terr)
+ del(mga)
+ del(xme)
+
+if __name__ == "__main__":
+ unittest.main()
Modified: trunk/Tests/GPyUnit/run_tests.py
==============================================================================
--- trunk/Tests/GPyUnit/run_tests.py Thu Sep 29 14:36:05 2011 (r1561)
+++ trunk/Tests/GPyUnit/run_tests.py Thu Sep 29 14:41:20 2011 (r1562)
@@ -7,6 +7,7 @@
'test_gmeoleapp',
'GME_297.suite',
'GME_310.suite',
+ 'GME_371',
'Regr.Mga.tc1',
'Regr.Mga.tc2',
'Regr.Mga.tc3',
More information about the gme-commit
mailing list