Revision: 90d36bfca027
Author:   Janne Härkönen <[email protected]>
Date:     Fri Nov 11 01:45:22 2011
Log:      Only one API to Statistics
http://code.google.com/p/robotframework/source/detail?r=90d36bfca027

Modified:
 /src/robot/model/statistics.py
 /src/robot/result/testsuite.py

=======================================
--- /src/robot/model/statistics.py      Fri Nov 11 01:36:55 2011
+++ /src/robot/model/statistics.py      Fri Nov 11 01:45:22 2011
@@ -141,25 +141,6 @@
         return self.failed == 0


-class CriticalStats(Stat):
-
-    def __init__(self, suite):
-        Stat.__init__(self)
-        self.add_suite(suite)
-
-    def _is_included(self, test):
-        return test.critical == 'yes'
-
-    def _subsuite_stats(self, suite):
-        return suite.critical_stats
-
-class AllStats(Stat):
-
-    def __init__(self, suite):
-        Stat.__init__(self)
-        self.add_suite(suite)
-
-
 class SuiteStat(Stat):
     type = 'suite'

=======================================
--- /src/robot/result/testsuite.py      Thu Nov 10 06:42:09 2011
+++ /src/robot/result/testsuite.py      Fri Nov 11 01:45:22 2011
@@ -12,7 +12,7 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.

-from robot.common.statistics import CriticalStats, AllStats
+from robot.model.statistics import Statistics
 from robot import model, utils

 from messagefilter import MessageFilter
@@ -61,11 +61,11 @@

     @property
     def critical_stats(self):
-        return CriticalStats(self)
+        return Statistics(self).suite.critical

     @property
     def all_stats(self):
-        return AllStats(self)
+        return Statistics(self).suite.all

     @property
     def elapsedtime(self):

Reply via email to