[gnome-settings-daemon] power: Bug fix for test_dim()



commit 985d909214b9a27485ed196b4768d624aaf134ab
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Apr 17 16:07:52 2013 +0200

    power: Bug fix for test_dim()
    
    We need to wait a little longer for the brightness to change.

 plugins/power/test.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/plugins/power/test.py b/plugins/power/test.py
index cce67dd..602b272 100755
--- a/plugins/power/test.py
+++ b/plugins/power/test.py
@@ -532,7 +532,10 @@ class PowerPluginTest(gsdtestcase.GSDTestCase):
 
         # Wait and check we're not idle, but dimmed
         self.check_dim(gsdpowerconstants.MINIMUM_IDLE_DIM_DELAY)
-        self.assertTrue(self.get_brightness() == dim_level, 'incorrect dim brightness (%d != %d)' % 
(self.get_brightness(), dim_level))
+        # Give time for the brightness to change
+        time.sleep(2)
+        level = self.get_brightness();
+        self.assertTrue(level == dim_level, 'incorrect dim brightness (%d != %d)' % (level, dim_level))
 
         self.assertEqual(self.get_status(), gsdpowerenums.GSM_PRESENCE_STATUS_AVAILABLE)
 


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