]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix mistake in barry_as_FLUFL test (GH-31392)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 18 Feb 2022 02:08:28 +0000 (18:08 -0800)
committerGitHub <noreply@github.com>
Fri, 18 Feb 2022 02:08:28 +0000 (18:08 -0800)
Use assertEqual(), not assertTrue(lineno, 2)
(cherry picked from commit 5f1c205dcec0adf68b76ba78247a0ec1fa9a7b66)

Co-authored-by: Patrick Reader <_@pxeger.com>
Lib/test/test_flufl.py

index 22285859a92bb1eaec2da376a31e16d7ac706514..e9462dfc70c4ee947dd37f73819f705b56a61c93 100644 (file)
@@ -17,7 +17,7 @@ class FLUFLTests(unittest.TestCase):
         self.assertIn('2 != 3', cm.exception.text)
         self.assertEqual(cm.exception.filename, '<FLUFL test>')
 
-        self.assertTrue(cm.exception.lineno, 2)
+        self.assertEqual(cm.exception.lineno, 2)
         # The old parser reports the end of the token and the new
         # parser reports the start of the token
         self.assertEqual(cm.exception.offset, 4 if support.use_old_parser() else 3)