jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/907911 )

Change subject: [tests] Replace deprecated TimeStripper attributes
......................................................................

[tests] Replace deprecated TimeStripper attributes

Change-Id: I0b850eebff5de28c5e822041c625ed829dd39625
---
M tests/timestripper_tests.py
1 file changed, 13 insertions(+), 4 deletions(-)

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




diff --git a/tests/timestripper_tests.py b/tests/timestripper_tests.py
index f9a929c..2720a17 100755
--- a/tests/timestripper_tests.py
+++ b/tests/timestripper_tests.py
@@ -1,7 +1,7 @@
 #!/usr/bin/env python3
 """Tests for archivebot.py/Timestripper."""
 #
-# (C) Pywikibot team, 2014-2022
+# (C) Pywikibot team, 2014-2023
 #
 # Distributed under the terms of the MIT license.
 #
@@ -41,7 +41,7 @@
         txt_with_one_match = 'this string has 3000, 1999 and 3000 in it'
         txt_with_two_match = 'this string has 1998, 1999 and 3000 in it'
         txt_with_no_match = 'this string has no match'
-        pat = self.ts.pyearR
+        pat = self.ts.patterns.year

         txt, m = self.ts._last_match_and_replace(txt_with_one_match, pat)
         self.assertEqual('this string has 3000, @@@@ and 3000 in it', txt)
@@ -63,7 +63,7 @@
         txt_with_two_match = 'this string has XXX, mars and février in it'
         txt_with_three_match = 'this string has avr, mars and février in it'
         txt_with_no_match = 'this string has no match'
-        pat = self.ts.pmonthR
+        pat = self.ts.patterns.month

         txt, m = self.ts._last_match_and_replace(txt_with_one_match, pat)
         self.assertEqual('this string has XXX, YYY and @@@@@@@ in it', txt)
@@ -109,7 +109,7 @@
         txt_with_two_match = 'this string has XX. 1. 12. in it'
         txt_with_three_match = 'this string has 1. 1. 12. in it'
         txt_with_no_match = 'this string has no match'
-        pat = self.ts.pmonthR
+        pat = self.ts.patterns.month

         txt, m = self.ts._last_match_and_replace(txt_with_one_match, pat)
         self.assertEqual('this string has XX. YY. 12. in it', txt)

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

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I0b850eebff5de28c5e822041c625ed829dd39625
Gerrit-Change-Number: 907911
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <i...@gno.de>
Gerrit-Reviewer: Xqt <i...@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- pywikibot-commits@lists.wikimedia.org
To unsubscribe send an email to pywikibot-commits-le...@lists.wikimedia.org

Reply via email to