Revision: 3305
Author: janne.t.harkonen
Date: Tue May 18 02:27:39 2010
Log: Do not set source for data file
http://code.google.com/p/robotframework/source/detail?r=3305
Modified:
/trunk/src/robot/parsing/populator.py
/trunk/utest/parsing/test_populator.py
=======================================
--- /trunk/src/robot/parsing/populator.py Tue May 18 02:23:10 2010
+++ /trunk/src/robot/parsing/populator.py Tue May 18 02:27:39 2010
@@ -295,9 +295,8 @@
def __init__(self, datafile, path):
self._datafile = datafile
- self._datafile.source = path
self._current_populator = self._null_populator
- self._curdir = os.path.dirname(self._datafile.source)
+ self._curdir = os.path.dirname(path)
def start_table(self, name):
try:
=======================================
--- /trunk/utest/parsing/test_populator.py Tue May 18 02:23:10 2010
+++ /trunk/utest/parsing/test_populator.py Tue May 18 02:27:39 2010
@@ -1,4 +1,5 @@
import unittest
+import os
from robot.parsing.populator import TestCaseFilePopulator
from robot.parsing.newmodel import TestCaseFile
@@ -12,9 +13,6 @@
self._path = '/path/to/source.txt'
self._populator = TestCaseFilePopulator(self._datafile, self._path)
- def test_creation(self):
- assert_equals(self._datafile.source, self._path)
-
def test_starting_valid_table(self):
for name in ['Test Cases', ' variables ', 'K E Y WO R D S']:
assert_true(self._start_table(name))
@@ -173,7 +171,7 @@
def test_curdir_handling(self):
self._create_table('Test cases', [['My test name'],
['', 'Log', '${CURDIR}']])
- assert_equals(self._first_test().steps[0].args, ['/path/to'])
+ assert_equals(self._first_test().steps[0].args,
[os.path.dirname(self._path)])
def test_turn_off_curdir_handling(self):
from robot.parsing import populator