]> granicus.if.org Git - python/commitdiff
bpo-18374: fix tests to check the correct thing about line numbers (GH-14659) (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 9 Jul 2019 13:28:57 +0000 (06:28 -0700)
committerIvan Levkivskyi <levkivskyi@gmail.com>
Tue, 9 Jul 2019 13:28:56 +0000 (14:28 +0100)
(cherry picked from commit 430a9f44fe22f029ae8cfeecb46621d7e199414b)

Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
Lib/test/test_ast.py

index 1e07c573c8463234d63d17a57ed70d168b3154c4..6bd27ce12a6238057d8c5e65f8b7b0f8763686de 100644 (file)
@@ -598,14 +598,14 @@ class AST_Tests(unittest.TestCase):
         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