[commit] r1569 - trunk/Tests/GPyUnit

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Fri Sep 30 09:51:54 CDT 2011


Author: ksmyth
Date: Fri Sep 30 09:51:54 2011
New Revision: 1569

Log:
Basic parser test

Added:
   trunk/Tests/GPyUnit/test_parser.py
Modified:
   trunk/Tests/GPyUnit/run_tests.py

Modified: trunk/Tests/GPyUnit/run_tests.py
==============================================================================
--- trunk/Tests/GPyUnit/run_tests.py	Fri Sep 30 09:51:44 2011	(r1568)
+++ trunk/Tests/GPyUnit/run_tests.py	Fri Sep 30 09:51:54 2011	(r1569)
@@ -5,6 +5,7 @@
 _tests = unittest.defaultTestLoader.loadTestsFromNames((
  'test_registrar',
  'test_gmeoleapp',
+ 'test_parser',
  'GME_297.suite',
  'GME_310.suite',
  'GME_371',

Added: trunk/Tests/GPyUnit/test_parser.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/Tests/GPyUnit/test_parser.py	Fri Sep 30 09:51:54 2011	(r1569)
@@ -0,0 +1,21 @@
+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"
+        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)
+        xme.ParseProject(mga, inputfile)
+        mga.Save()
+        mga.Close()
+        del(mga)
+        del(xme)
+
+if __name__ == "__main__":
+        unittest.main()


More information about the gme-commit mailing list