[gnome-settings-daemon/benzea/ci-fixes: 19/19] tests: Make sure file time changes seconds




commit 54d0749262c9168df4c8543d99d9198e5dfaba21
Author: Benjamin Berg <bberg redhat com>
Date:   Thu Jul 22 10:45:41 2021 +0200

    tests: Make sure file time changes seconds
    
    Otherwise fontconfig might report that no update was necessary, and
    g-s-d would print a different message, resulting in a test failure.

 plugins/xsettings/test.py | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/plugins/xsettings/test.py b/plugins/xsettings/test.py
index 7b25169a..0909752e 100755
--- a/plugins/xsettings/test.py
+++ b/plugins/xsettings/test.py
@@ -120,6 +120,9 @@ class XsettingsPluginTest(gsdtestcase.GSDTestCase):
         before = self.obj_xsettings_props.Get('org.gtk.Settings', 'FontconfigTimestamp')
         self.assertEqual(before, 0)
 
+        # Make sure the seconds changed
+        time.sleep(1)
+
         # Copy the fonts.conf again
         shutil.copy(os.path.join(os.path.dirname(__file__), 'fontconfig-test/fonts.conf'),
                 os.path.join(self.fc_dir, 'fonts.conf'))


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