| 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 __future__ import annotations |
| 6 |
|
| 7 |
from astroid import builder |
| 8 |
|
| 9 |
|
| 10 |
def test_pytest() -> None: |
| 11 |
ast_node = builder.extract_node(""" |
| 12 |
import pytest |
| 13 |
pytest #@ |
| 14 |
""") |
| 15 |
module = next(ast_node.infer()) |
| 16 |
attrs = [ |
| 17 |
"deprecated_call", |
| 18 |
"warns", |
| 19 |
"exit", |
| 20 |
"fail", |
| 21 |
"skip", |
| 22 |
"importorskip", |
| 23 |
"xfail", |
| 24 |
"mark", |
| 25 |
"raises", |
| 26 |
"freeze_includes", |
| 27 |
"set_trace", |
| 28 |
"fixture", |
| 29 |
"yield_fixture", |
| 30 |
] |
| 31 |
for attr in attrs: |
| 32 |
assert attr in module |