-
-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
19734a1
commit b28067e
Showing
3 changed files
with
27 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html | ||
# For details: https://github.com/PyCQA/astroid/blob/main/LICENSE | ||
# Copyright (c) https://github.com/PyCQA/astroid/blob/main/CONTRIBUTORS.txt | ||
|
||
from astroid.builder import extract_node | ||
from astroid.filter_statements import _filter_stmts | ||
from astroid.nodes import EmptyNode | ||
|
||
|
||
def test_empty_node() -> None: | ||
enum_mod = extract_node("import enum") | ||
empty = EmptyNode(parent=enum_mod) | ||
empty.is_statement = True | ||
filtered_statements = _filter_stmts( | ||
empty, [empty.statement(future=True)], empty.frame(future=True), 0 | ||
) | ||
assert filtered_statements[0] is empty |