Skip to content

Commit 99ecac5

Browse files
committed
assertRaisesRegex doesn't exist on py2 (also fuck yapf)
This deprecation is totally gonna come back and bite us when the regexp gets removed completely in never version´
1 parent 7583fa9 commit 99ecac5

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

tests/test_videonote.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,17 @@ def test_error_send_videonote_required_args_only(self):
6363
# It would also seem that it is in fact a required parameter, so the original test below
6464
# fails. Therefore I decided I check for the error instead - that way we'll also know
6565
# when telegram fixes their shit
66-
with self.assertRaisesRegex(telegram.error.BadRequest, r'Wrong video note length'):
66+
with self.assertRaisesRegexp(telegram.error.BadRequest, r'Wrong video note length'):
6767
message = self._bot.sendVideoNote(self._chat_id, self.videonote_file, timeout=10)
6868

69-
# videonote = message.videonote
70-
#
71-
# self.assertTrue(isinstance(videonote.file_id, str))
72-
# self.assertNotEqual(videonote.file_id, None)
73-
# self.assertEqual(videonote.duration, self.duration)
74-
# self.assertEqual(videonote.length, self.length)
75-
# self.assertEqual(videonote.thumb, self.thumb)
76-
# self.assertEqual(videonote.file_size, self.file_size)
69+
# videonote = message.videonote
70+
#
71+
# self.assertTrue(isinstance(videonote.file_id, str))
72+
# self.assertNotEqual(videonote.file_id, None)
73+
# self.assertEqual(videonote.duration, self.duration)
74+
# self.assertEqual(videonote.length, self.length)
75+
# self.assertEqual(videonote.thumb, self.thumb)
76+
# self.assertEqual(videonote.file_size, self.file_size)
7777

7878
@flaky(3, 1)
7979
@timeout(10)

0 commit comments

Comments
 (0)