mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
bpo-42246: Partial implementation of PEP 626. (GH-23113)
* Implement new line number table format, as defined in PEP 626.
This commit is contained in:
parent
cda99b4022
commit
877df851c3
19 changed files with 5364 additions and 5000 deletions
|
|
@ -155,8 +155,8 @@ if 1:
|
|||
def test_leading_newlines(self):
|
||||
s256 = "".join(["\n"] * 256 + ["spam"])
|
||||
co = compile(s256, 'fn', 'exec')
|
||||
self.assertEqual(co.co_firstlineno, 257)
|
||||
self.assertEqual(co.co_lnotab, bytes())
|
||||
self.assertEqual(co.co_firstlineno, 1)
|
||||
self.assertEqual(list(co.co_lines()), [(0, 4, 257), (4, 8, None)])
|
||||
|
||||
def test_literals_with_leading_zeroes(self):
|
||||
for arg in ["077787", "0xj", "0x.", "0e", "090000000000000",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue