Author: janne.t.harkonen
Date: Thu Dec  4 05:48:16 2008
New Revision: 1177

Modified:
   trunk/tools/statuschecker/statuschecker.py

Log:
fixed bug with default log message index

Modified: trunk/tools/statuschecker/statuschecker.py
==============================================================================
--- trunk/tools/statuschecker/statuschecker.py  (original)
+++ trunk/tools/statuschecker/statuschecker.py  Thu Dec  4 05:48:16 2008
@@ -115,8 +115,8 @@
         return True
     test.status = 'FAIL'
     test.message = ("Wrong level for message %d of keyword '%s'.\n\n"
-                    "Expected: %s\nActual: %s"
-                    % (index+1, kw.name, expected, actual))
+                    "Expected: %s\nActual: %s.\n%s"
+ % (index+1, kw.name, expected, actual, kw.messages[index].message))
     return False

 def _check_log_message(expected, test, kw, index):
@@ -154,7 +154,7 @@
         try:
             kw_indices, msg_index = index_str.split(':')
         except ValueError:
-            kw_indices, msg_index = index_str, '0'
+            kw_indices, msg_index = index_str, '1'
         kw_indices = [ int(index) - 1 for index in kw_indices.split('.') ]
         return kw_indices, int(msg_index) - 1

Reply via email to