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