Skip to content

Commit

Permalink
fixup! Add NEWS entry
Browse files Browse the repository at this point in the history
  • Loading branch information
pablogsal committed May 30, 2022
1 parent c0a3429 commit 4fa8695
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
23 changes: 6 additions & 17 deletions Lib/test/test_ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,23 +363,12 @@ def test_invalid_position_information(self):
compile(tree, '<string>', 'exec')

def test_compilation_of_ast_nodes_with_default_end_position_values(self):
tree = ast.Module(
body=[
ast.Assign(
targets=[
ast.Name(
id='a',
ctx=ast.Store(),
lineno=10,
col_offset=10)
],
value=ast.Constant(
value=1,
lineno=10,
col_offset=40),
lineno=10,
col_offset=10)],
type_ignores=[])
tree = ast.Module(body=[
ast.Import(names=[ast.alias(name='builtins', lineno=1, col_offset=0)], lineno=1, col_offset=0),
ast.Import(names=[ast.alias(name='traceback', lineno=0, col_offset=0)], lineno=0, col_offset=1)
], type_ignores=[])

# Check that compilation doesn't crash. Note: this may crash explicitly only on debug mode.
compile(tree, "<string>", "exec")

def test_slice(self):
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Ensure that custom :mod:`ast` nodes without explicit end positions can be
compiled. Patch by Pablo Galindo.

0 comments on commit 4fa8695

Please sign in to comment.