[gnome-settings-daemon/wip/hadess/fix-ci] tests: Fix error during output checker exception



commit 0a243842baa22013ea98a84a401a983d9b10ff62
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Jul 16 15:16:52 2021 +0200

    tests: Fix error during output checker exception
    
    Traceback (most recent call last):
      File "/builds/GNOME/gnome-settings-daemon/plugins/power/test.py", line 760, in test_lid_close_inhibition
        self.check_no_lid_uninhibited(gsdpowerconstants.LID_CLOSE_SAFETY_TIMEOUT - 1)
      File "/builds/GNOME/gnome-settings-daemon/plugins/power/test.py", line 327, in check_no_lid_uninhibited
        self.plugin_log.check_no_line(b'uninhibiting lid close', wait=timeout)
      File "/builds/GNOME/gnome-settings-daemon/tests/output_checker.py", line 143, in check_no_line
        return self.check_no_line_re(needle_re, wait=wait, failmsg=failmsg)
      File "/builds/GNOME/gnome-settings-daemon/tests/output_checker.py", line 133, in check_no_line_re
        raise AssertionError('Found needle %s but shouldn\'t have been there (timeout: %0.2f)' % 
(str(needle_re), timeout))
    NameError: name 'timeout' is not defined

 tests/output_checker.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/tests/output_checker.py b/tests/output_checker.py
index 3f5a1e1c..35c19f78 100644
--- a/tests/output_checker.py
+++ b/tests/output_checker.py
@@ -130,7 +130,7 @@ class OutputChecker(object):
                 if failmsg:
                     raise AssertionError(failmsg)
                 else:
-                    raise AssertionError('Found needle %s but shouldn\'t have been there (timeout: %0.2f)' % 
(str(needle_re), timeout))
+                    raise AssertionError('Found needle %s but shouldn\'t have been there (timeout: %0.2f)' % 
(str(needle_re), wait))
 
         return ret
 


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