jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1154380?usp=email )
Change subject: tests: Validate that Timestamp.replace() returns a Timestamp ......................................................................
tests: Validate that Timestamp.replace() returns a Timestamp
Change-Id: I3b6f3069a8c022f8d86ac95a4de871b3828382d6 --- M tests/time_tests.py 1 file changed, 6 insertions(+), 0 deletions(-)
Approvals: Matěj Suchánek: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/time_tests.py b/tests/time_tests.py index ec36c84..ab3a40c 100755 --- a/tests/time_tests.py +++ b/tests/time_tests.py @@ -64,6 +64,12 @@ ], }
+ def test_clone(self) -> None: + """Validate that Timestamp.replace() returns a Timestamp.""" + ts1 = Timestamp.now() + ts2 = ts1.replace() + self.assertIsInstance(ts2, Timestamp) + def test_set_from_timestamp(self) -> None: """Test creating instance from Timestamp object.""" for func in Timestamp.utcnow, Timestamp.nowutc:
pywikibot-commits@lists.wikimedia.org