| 1 |
# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html |
| 2 |
# For details: https://github.com/pylint-dev/astroid/blob/main/LICENSE |
| 3 |
# Copyright (c) https://github.com/pylint-dev/astroid/blob/main/CONTRIBUTORS.txt |
| 4 |
|
| 5 |
from astroid.builder import extract_node |
| 6 |
from astroid.filter_statements import _filter_stmts |
| 7 |
from astroid.nodes import EmptyNode |
| 8 |
|
| 9 |
|
| 10 |
def test_empty_node() -> None: |
| 11 |
enum_mod = extract_node("import enum") |
| 12 |
empty = EmptyNode(parent=enum_mod) |
| 13 |
empty.is_statement = True |
| 14 |
filtered_statements = _filter_stmts(empty, [empty.statement()], empty.frame(), 0) |
| 15 |
assert filtered_statements[0] is empty |