Revision: 164
Author: jprantan
Date: Mon Jul 12 06:09:55 2010
Log: Fixed unit tests.
http://code.google.com/p/robotframework-mabot/source/detail?r=164

Modified:
 /tags/mabot-0.7/utest/test_io.py

=======================================
--- /tags/mabot-0.7/utest/test_io.py    Wed Jul  7 05:18:59 2010
+++ /tags/mabot-0.7/utest/test_io.py    Mon Jul 12 06:09:55 2010
@@ -18,6 +18,7 @@
 import unittest
 from os.path import abspath, dirname, join, normcase
 import shutil
+import sys

 from robot.utils.asserts import *
 from robot.version import get_version
@@ -153,10 +154,9 @@
         self._test_error(VALID_HTML_INVALID_XML_DATASOURCE, msg)

     def _get_invalid_xml_message(self, path):
-        if ROBOT_VERSION < '2.1':
-            msg = "File '%s' is not a valid XML file.\n"
-        else:
- msg = "Opening XML file '%s' failed: SyntaxError: no element found: line 1, column 0\n" + msg = "Opening XML file '%s' failed: SyntaxError: no element found: line 1, column 0\n"
+        if sys.version.split()[0] == '2.7':
+            msg = msg.replace('SyntaxError', 'ParseError')
         return msg % (path)

     def test_load_data_with_xml_error_and_datasource_error(self):

Reply via email to