Test feature background.
(pytester)
| 76 | |
| 77 | |
| 78 | def 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 | |
| 100 | def test_background_check_order(pytester): |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…