Revision: 3452
Author: KariHusa
Date: Tue May 25 00:36:47 2010
Log: Do not run resource files
http://code.google.com/p/robotframework/source/detail?r=3452

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

=======================================
--- /trunk/src/robot/parsing/model.py   Mon May 24 12:33:03 2010
+++ /trunk/src/robot/parsing/model.py   Tue May 25 00:36:47 2010
@@ -64,6 +64,11 @@
         self.keyword_table = KeywordTable(self)
         if source:
             FromFilePopulator(self).populate(source)
+            self._validate()
+
+    def _validate(self):
+        if not self.testcase_table.is_started():
+            raise DataError()

     def __iter__(self):
         for table in [self.setting_table, self.variable_table,
@@ -287,6 +292,9 @@
     def __nonzero__(self):
         return bool(self.tests)

+    def is_started(self):
+        return bool(self.header)
+

 class KeywordTable(_Table):

Reply via email to