File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 22
33import pytest
44
5+ from tests .plugins .integration import CLI_FLAG
56
6- def test_automatically_skip ():
7- pytest .fail ("tests in `integration` directory should be automatically skipped" )
7+
8+ def test_automatically_skip (request ):
9+ if not request .config .getoption (CLI_FLAG ):
10+ pytest .fail ("tests in `integration` directory should be automatically skipped" )
Original file line number Diff line number Diff line change 1+ from __future__ import annotations
2+
3+ from .integration import CLI_FLAG
4+ from .integration import MARK
5+
6+
7+ def test_cli_flag_registered (pytestconfig ):
8+ assert pytestconfig .getoption (CLI_FLAG ) in (
9+ True ,
10+ False ,
11+ ), f"{ CLI_FLAG } should be registered with pytest"
12+
13+
14+ def test_markers_registered (pytestconfig ):
15+ markers = pytestconfig .getini ("markers" )
16+ assert any (
17+ f"{ MARK } :" in marker for marker in markers
18+ ), f"{ MARK } marker should be registered"
You can’t perform that action at this time.
0 commit comments