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

Function test_strict_option_is_deprecated

testing/deprecated_test.py:104–120  ·  view source on GitHub ↗

--strict is a deprecated alias to --strict-markers (#7530).

(pytester: Pytester)

Source from the content-addressed store, hash-verified

102
103
104def test_strict_option_is_deprecated(pytester: Pytester) -> None:
105 """--strict is a deprecated alias to --strict-markers (#7530)."""
106 pytester.makepyfile(
107 """
108 import pytest
109
110 @pytest.mark.unknown
111 def test_foo(): pass
112 """
113 )
114 result = pytester.runpytest("--strict")
115 result.stdout.fnmatch_lines(
116 [
117 "'unknown' not found in `markers` configuration option",
118 "*PytestRemovedIn8Warning: The --strict option is deprecated, use --strict-markers instead.",
119 ]
120 )
121
122
123def test_yield_fixture_is_deprecated() -> None:

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected