]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix mistake in barry_as_FLUFL test (GH-31392)
authorPatrick Reader <_@pxeger.com>
Fri, 18 Feb 2022 01:45:35 +0000 (01:45 +0000)
committerGitHub <noreply@github.com>
Fri, 18 Feb 2022 01:45:35 +0000 (20:45 -0500)
Use assertEqual(), not assertTrue(lineno, 2)

Lib/test/test_flufl.py

index 0ff54aa227e37c63bd4e6275a32b8cbe451602e3..a81a4d4c8f0e4c62b0e1825d6800202f682e3c46 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, 3)