jenkins-bot merged this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
TestTimestamp.test_iso_format: Ensure t1.microsecond is not 0

Bug: T199179
Change-Id: I2303f18f2f73922a0988e7806a945f06f78a61cb
---
M tests/timestamp_tests.py
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/tests/timestamp_tests.py b/tests/timestamp_tests.py
index b1d72f7..8ddb8a1 100644
--- a/tests/timestamp_tests.py
+++ b/tests/timestamp_tests.py
@@ -43,6 +43,8 @@
"""Test conversion from and to ISO format."""
sep = 'T'
t1 = Timestamp.utcnow()
+ if not t1.microsecond: # T199179: ensure microsecond is not 0
+ t1 = t1.replace(microsecond=1)
ts1 = t1.isoformat()
t2 = Timestamp.fromISOformat(ts1)
ts2 = t2.isoformat()

To view, visit change 444788. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I2303f18f2f73922a0988e7806a945f06f78a61cb
Gerrit-Change-Number: 444788
Gerrit-PatchSet: 1
Gerrit-Owner: Dalba <dalba.wiki@gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: Zoranzoki21 <zorandori4444@gmail.com>
Gerrit-Reviewer: jenkins-bot