diff options
| author | Batuhan Taskaya <batuhan@python.org> | 2021-07-04 18:02:16 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-04 18:02:16 (GMT) |
| commit | 44f91fc802a2b71312e9abd9e8e9dcbf02e8216d (patch) | |
| tree | a4ae2ed6dc8cb896efb695abb3a1c299f10e53e5 /Lib/test/test_code.py | |
| parent | d33943a6c368c2184e238019c63ac7a267da5594 (diff) | |
| download | cpython-44f91fc802a2b71312e9abd9e8e9dcbf02e8216d.zip cpython-44f91fc802a2b71312e9abd9e8e9dcbf02e8216d.tar.gz cpython-44f91fc802a2b71312e9abd9e8e9dcbf02e8216d.tar.bz2 | |
bpo-43950: use 0-indexed column offsets for bytecode positions (GH-27011)
Diffstat (limited to 'Lib/test/test_code.py')
| -rw-r--r-- | Lib/test/test_code.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_code.py b/Lib/test/test_code.py index 55ba30a..24d27c0 100644 --- a/Lib/test/test_code.py +++ b/Lib/test/test_code.py @@ -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) |
