Xqt has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1177436?usp=email )

Change subject: Tests: some more tests for maintenance.cache
......................................................................

Tests: some more tests for maintenance.cache

Change-Id: I8594cacc47f11ca81d5ffb3bd19cf25cb2d69efc
---
M tests/cache_tests.py
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Xqt: Verified; Looks good to me, approved




diff --git a/tests/cache_tests.py b/tests/cache_tests.py
index 1c1cc7b..d9671e1 100755
--- a/tests/cache_tests.py
+++ b/tests/cache_tests.py
@@ -1,12 +1,13 @@
 #!/usr/bin/env python3
 """API Request cache tests."""
 #
-# (C) Pywikibot team, 2012-2024
+# (C) Pywikibot team, 2012-2025
 #
 # Distributed under the terms of the MIT license.
 #
 from __future__ import annotations

+import re
 import unittest
 
 from pywikibot.login import LoginStatus
@@ -31,6 +32,8 @@
             self.assertIsNotNone(entry.site._username)  # pragma: no cover
         self.assertIsInstance(entry._params, dict)
         self.assertIsNotNone(entry._params)
+        self.assertLength(str(entry), 64)
+        self.assertIsNotNone(re.fullmatch(r'[0-9a-f]+', str(entry)))
         # TODO: more tests on entry._params, and possibly fixes needed
         # to make it closely replicate the original object.


--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1177436?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I8594cacc47f11ca81d5ffb3bd19cf25cb2d69efc
Gerrit-Change-Number: 1177436
Gerrit-PatchSet: 4
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to