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



commit edfb2d8f370f720ccccfb27fd3cbb7afd00bd8af
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]