Revision: 3310
Author: jprantan
Date: Tue May 18 03:12:06 2010
Log: updated to match populator changes
http://code.google.com/p/robotframework/source/detail?r=3310

Modified:
 /trunk/src/robot/parsing/tsvreader.py
 /trunk/utest/parsing/test_model.py

=======================================
--- /trunk/src/robot/parsing/tsvreader.py       Tue May 18 02:39:17 2010
+++ /trunk/src/robot/parsing/tsvreader.py       Tue May 18 03:12:06 2010
@@ -13,14 +13,14 @@
 #  limitations under the License.

 from codecs import BOM_UTF8
-from populator import TestCaseFilePopulator
+from populator import TestDataPopulator


 class TsvReader:

     def read(self, tsvfile, datafile):
         process = False
-        populator = TestCaseFilePopulator(datafile, tsvfile.name)
+        populator = TestDataPopulator(datafile)
         for index, row in enumerate(tsvfile.readlines()):
             if index == 0 and row.startswith(BOM_UTF8):
                 row = row[len(BOM_UTF8):]
=======================================
--- /trunk/utest/parsing/test_model.py  Tue May 18 02:39:17 2010
+++ /trunk/utest/parsing/test_model.py  Tue May 18 03:12:06 2010
@@ -4,12 +4,18 @@
 from robot.utils.asserts import *
 from robot.parsing.newmodel import *
 from robot.parsing.txtreader import TxtReader
+import robot.parsing.populator


 class TestTestCaseFile(unittest.TestCase):

     def setUp(self):
         self.tcf = TestCaseFile()
+        self._orig_curdir = robot.parsing.populator.PROCESS_CURDIR
+        robot.parsing.populator.PROCESS_CURDIR = False
+
+    def tearDown(self):
+        robot.parsing.populator.PROCESS_CURDIR = self._orig_curdir

     def test_create(self):
         assert_none(self.tcf.source)
@@ -20,7 +26,6 @@

     def test_integration(self):
         test_file = StringIO('*** Test Cases *** \ntest  No operation\n')
-        test_file.name = '/tmp/foo.txt'
         TxtReader().read(test_file, self.tcf)
         assert_equal(len(self.tcf.testcase_table.tests), 1)
         assert_equal(self.tcf.testcase_table.tests[0].name, 'test')

Reply via email to