bpo-43950: use 0-indexed column offsets for bytecode positions (GH-27011)

This commit is contained in:
Batuhan Taskaya 2021-07-04 21:02:16 +03:00 committed by GitHub
parent d33943a6c3
commit 44f91fc802
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 22 deletions

View file

@ -344,7 +344,7 @@ class CodeTest(unittest.TestCase):
# get assigned the first_lineno but they don't have other positions.
# There is no easy way of inferring them at that stage, so for now
# we don't support it.
self.assertTrue(all(positions) or not any(positions))
self.assertTrue(positions.count(None) in [0, 4])
if not any(positions):
artificial_instructions.append(instr)