From 4528a847e47002788fa9965faa348ec2313cd7ec Mon Sep 17 00:00:00 2001 From: James Lu Date: Sun, 26 Jan 2020 11:31:22 -0800 Subject: [PATCH] Aka, Google, String: fix more DeprecationWarning in tests (#1328) --- plugins/Aka/test.py | 4 ++-- plugins/Google/test.py | 2 +- plugins/String/test.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/Aka/test.py b/plugins/Aka/test.py index dc997b263..3aee0a983 100644 --- a/plugins/Aka/test.py +++ b/plugins/Aka/test.py @@ -267,9 +267,9 @@ class AkaTestCase(PluginTestCase): def testList(self): self.assertNotError('aka add foo bar') - self.assertRegexp('aka list', 'foo.*?bar \$\*') + self.assertRegexp('aka list', r'foo.*?bar \$\*') self.assertNotError('aka add "foo bar" baz') - self.assertRegexp('aka list', 'foo.*?bar \$\*.*?foo bar.*?baz \$\*') + self.assertRegexp('aka list', r'foo.*?bar \$\*.*?foo bar.*?baz \$\*') def testListLockedUnlocked(self): self.assertNotError('register tacocat hunter2') diff --git a/plugins/Google/test.py b/plugins/Google/test.py index e4e3bd8ca..d3b09ebcc 100644 --- a/plugins/Google/test.py +++ b/plugins/Google/test.py @@ -58,7 +58,7 @@ class GoogleTestCase(ChannelPluginTestCase): self.assertRegexp( 'google site:http://www.urbandictionary.com carajo land', '\x02Urban Dictionary: carajo land\x02: ' - 'https?://www.urbandictionary.com/define.php\?term=carajo%20land') + r'https?://www.urbandictionary.com/define.php\?term=carajo%20land') def testLucky(self): self.assertResponse('lucky Hacker News', diff --git a/plugins/String/test.py b/plugins/String/test.py index b22ce9145..4368007d8 100644 --- a/plugins/String/test.py +++ b/plugins/String/test.py @@ -130,7 +130,7 @@ class StringTestCase(PluginTestCase): self.assertNotRegexp('re foo bar baz', 'unpack list of wrong size') def testReBug850931(self): - self.assertResponse('re s/\b(\w+)\b/\1./g foo bar baz', + self.assertResponse(r're s/\b(\w+)\b/\1./g foo bar baz', 'foo. bar. baz.') def testNotOverlongRe(self):