blob: 3fc14bd5e87ee73134b65cae28561dc25c7cacbe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
# For details: https://github.com/pylint-dev/astroid/blob/main/LICENSE
# Copyright (c) https://github.com/pylint-dev/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
|