[gnome-desktop-testing] patch - gedit/gedit_chains.py



Hello all,

Looks like the gedit code fails to log the status. Fixed with the attached patch.

Index: gedit/gedit_chains.py
===================================================================
--- gedit/gedit_chains.py    (revision 4)
+++ gedit/gedit_chains.py    (working copy)
@@ -6,7 +6,7 @@
 from time import time, gmtime, strftime
 
 from desktoptesting.gnome import GEdit
-from desktoptesting.check import FileComparison
+from desktoptesting.check import *
 
 try:
 
@@ -29,15 +29,15 @@
     elapsed = stop_time - start_time
    
     testcheck = FileComparison(oracle, test_file)
-    check = testcheck.perform_test()
+    status = testcheck.perform_test()
 
     ldtp.log (str(elapsed), 'time')
    
-    if check == desktoptesting.check.FAIL:
+    if status == FAIL:
         ldtp.log ('Files differ.', 'cause')
         ldtp.log ('Files differ.', 'error')
 
-except ldtp.LdtpExecutionError, msg:
+except ldtp.LdtpExecutionError:
     raise

Thanks
Nagappan

--
Linux Desktop (GUI Application) Testing Project - http://ldtp.freedesktop.org
http://nagappanal.blogspot.com
Index: gedit/gedit_chains.py
===================================================================
--- gedit/gedit_chains.py	(revision 4)
+++ gedit/gedit_chains.py	(working copy)
@@ -6,7 +6,7 @@
 from time import time, gmtime, strftime
 
 from desktoptesting.gnome import GEdit
-from desktoptesting.check import FileComparison
+from desktoptesting.check import *
 
 try:
 
@@ -29,15 +29,15 @@
     elapsed = stop_time - start_time
     
     testcheck = FileComparison(oracle, test_file)
-    check = testcheck.perform_test()
+    status = testcheck.perform_test()
 
     ldtp.log (str(elapsed), 'time')
     
-    if check == desktoptesting.check.FAIL:
+    if status == FAIL:
         ldtp.log ('Files differ.', 'cause')
         ldtp.log ('Files differ.', 'error')
 
-except ldtp.LdtpExecutionError, msg:
+except ldtp.LdtpExecutionError:
     raise
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]