[Python-checkins] Fix mistake in barry_as_FLUFL test (GH-31392)

miss-islington webhook-mailer at python.org
Thu Feb 17 21:11:41 EST 2022


https://github.com/python/cpython/commit/095ffe715e341690fd047917d83bebe0359c9d80
commit: 095ffe715e341690fd047917d83bebe0359c9d80
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-02-17T18:11:34-08:00
summary:

Fix mistake in barry_as_FLUFL test (GH-31392)


Use assertEqual(), not assertTrue(lineno, 2)
(cherry picked from commit 5f1c205dcec0adf68b76ba78247a0ec1fa9a7b66)

Co-authored-by: Patrick Reader <_ at pxeger.com>

files:
M Lib/test/test_flufl.py

diff --git a/Lib/test/test_flufl.py b/Lib/test/test_flufl.py
index 0ff54aa227e37..a81a4d4c8f0e4 100644
--- a/Lib/test/test_flufl.py
+++ b/Lib/test/test_flufl.py
@@ -17,7 +17,7 @@ def test_barry_as_bdfl(self):
         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)



More information about the Python-checkins mailing list