[Python-checkins] bpo-18374: fix tests to check the correct thing about line numbers (GH-14659) (GH-14672)

Ivan Levkivskyi webhook-mailer at python.org
Tue Jul 9 09:29:01 EDT 2019


https://github.com/python/cpython/commit/68bd9c5691c4899d21cc7fe6cce7cd22b2f5ccb0
commit: 68bd9c5691c4899d21cc7fe6cce7cd22b2f5ccb0
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Ivan Levkivskyi <levkivskyi at gmail.com>
date: 2019-07-09T14:28:56+01:00
summary:

bpo-18374: fix tests to check the correct thing about line numbers (GH-14659) (GH-14672)

(cherry picked from commit 430a9f44fe22f029ae8cfeecb46621d7e199414b)

Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz at gmx.de>

files:
M Lib/test/test_ast.py

diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py
index 1e07c573c846..6bd27ce12a62 100644
--- a/Lib/test/test_ast.py
+++ b/Lib/test/test_ast.py
@@ -598,14 +598,14 @@ def test_issue18374_binop_col_offset(self):
         self.assertEqual(parent_binop.end_lineno, 2)
 
         self.assertEqual(child_binop.col_offset, 0)
-        self.assertEqual(parent_binop.lineno, 1)
+        self.assertEqual(child_binop.lineno, 1)
         self.assertEqual(child_binop.end_col_offset, 2)
-        self.assertEqual(parent_binop.end_lineno, 2)
+        self.assertEqual(child_binop.end_lineno, 2)
 
         self.assertEqual(grandchild_binop.col_offset, 0)
-        self.assertEqual(parent_binop.lineno, 1)
+        self.assertEqual(grandchild_binop.lineno, 1)
         self.assertEqual(grandchild_binop.end_col_offset, 3)
-        self.assertEqual(parent_binop.end_lineno, 2)
+        self.assertEqual(grandchild_binop.end_lineno, 1)
 
 class ASTHelpers_Test(unittest.TestCase):
     maxDiff = None



More information about the Python-checkins mailing list