jenkins-bot has submitted this change and it was merged.

Change subject: [FIX] site tests: Wait 1 second to change siteinfo
......................................................................


[FIX] site tests: Wait 1 second to change siteinfo

The test basically tests that 'time' is different, but this is only happening
once every second so it's waiting a second to guarantee to get a different
siteinfo dataset.

Change-Id: Ib3d7cfe9ea815e4331a5be207c2efe5e8a33a37c
---
M tests/site_tests.py
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  John Vandenberg: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/site_tests.py b/tests/site_tests.py
index d0a68a5..ba372f7 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -15,6 +15,7 @@
 from collections import Iterable
 from datetime import datetime
 import re
+import time
 
 import pywikibot
 
@@ -78,6 +79,7 @@
         self.assertIn('time', old)
         self.assertEqual(old, self.site.siteinfo['general'])
         self.assertEqual(self.site.siteinfo('general'), old)
+        time.sleep(1)
         self.assertNotEqual(self.site.siteinfo('general', force=True), old)
         self.assertDeprecation('Calling siteinfo is deprecated, use itself 
instead.')
 

-- 
To view, visit https://gerrit.wikimedia.org/r/216929
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib3d7cfe9ea815e4331a5be207c2efe5e8a33a37c
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to