MCPcopy Create free account
hub / github.com/pytest-dev/pytest-bdd / test_background_basic

Function test_background_basic

tests/feature/test_background.py:78–97  ·  view source on GitHub ↗

Test feature background.

(pytester)

Source from the content-addressed store, hash-verified

76
77
78def test_background_basic(pytester):
79 """Test feature background."""
80 pytester.makefile(".feature", background=textwrap.dedent(FEATURE))
81
82 pytester.makeconftest(textwrap.dedent(STEPS))
83
84 pytester.makepyfile(
85 textwrap.dedent(
86 """\
87 from pytest_bdd import scenario
88
89 @scenario("background.feature", "Basic usage")
90 def test_background():
91 pass
92
93 """
94 )
95 )
96 result = pytester.runpytest()
97 result.assert_outcomes(passed=1)
98
99
100def test_background_check_order(pytester):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…