Revision: 4d9618f7dcc4
Author:   Pekka Klärck
Date:     Wed Aug 29 00:27:29 2012
Log: little tablepopulators cleanup: reorg methods, consistent checking is populator Null
http://code.google.com/p/robotframework/source/detail?r=4d9618f7dcc4

Modified:
 /src/robot/parsing/tablepopulators.py

=======================================
--- /src/robot/parsing/tablepopulators.py       Tue Aug 28 13:41:31 2012
+++ /src/robot/parsing/tablepopulators.py       Wed Aug 29 00:27:29 2012
@@ -53,6 +53,9 @@
         else:
             self._add(row)

+    def _is_cacheable_comment_row(self, row):
+        return row.is_commented()
+
     def _add(self, row):
         if not self._is_continuing(row):
             self._populator.populate()
@@ -60,6 +63,9 @@
         self._comment_cache.consume(self._populator.add)
         self._populator.add(row)

+    def _is_continuing(self, row):
+        return row.is_continuing() and self._populator
+
     def _get_populator(self, row):
         raise NotImplementedError

@@ -67,12 +73,6 @@
         self._comment_cache.consume(self._populator.add)
         self._populator.populate()

-    def _is_continuing(self, row):
-        return row.is_continuing() and self._populator
-
-    def _is_cacheable_comment_row(self, row):
-        return row.is_commented()
-

 class SettingTablePopulator(_TablePopulator):

@@ -100,7 +100,7 @@
         return row.is_indented() and self._populator or row.is_commented()

     def _is_cacheable_comment_row(self, row):
- return row.is_commented() and isinstance(self._populator, NullPopulator)
+        return row.is_commented() and not self._populator


 class TestTablePopulator(_StepContainingTablePopulator):

Reply via email to