Revision: 3317
Author: pekka.klarck
Date: Tue May 18 05:02:19 2010
Log: started implementing TestDataDir
http://code.google.com/p/robotframework/source/detail?r=3317

Modified:
 /trunk/src/robot/parsing/newmodel.py

=======================================
--- /trunk/src/robot/parsing/newmodel.py        Tue May 18 03:43:02 2010
+++ /trunk/src/robot/parsing/newmodel.py        Tue May 18 05:02:19 2010
@@ -52,6 +52,18 @@
             yield table


+class TestDataDirectory(object):
+
+    def __init__(self, source=None):
+        self.source = source
+        self.setting_table = SettingTable()
+        self.variable_table = VariableTable()
+ self.testcase_table = TestCaseTableNotAllowed('test suite init file')
+        self.keyword_table = KeywordTable()
+        if source:
+            self._populate(source)
+
+
 class DataTable(object):
     pass

@@ -132,6 +144,15 @@
         return iter(self.keywords)


+class TestCaseTableNotAllowed(object):
+
+    def __init__(self, where):
+        self.message = 'Test case table not allowed in ' + where
+
+    def __getattr__(self, name):
+        raise DataError(self.message)
+
+
 class Variable(object):

     def __init__(self, name, value):

Reply via email to