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

Method create_file

testing/test_warnings.py:436–449  ·  view source on GitHub ↗
(self, pytester: Pytester, mark="")

Source from the content-addressed store, hash-verified

434 """
435
436 def create_file(self, pytester: Pytester, mark="") -> None:
437 pytester.makepyfile(
438 """
439 import pytest, warnings
440
441 warnings.warn(DeprecationWarning("collection"))
442
443 {mark}
444 def test_foo():
445 warnings.warn(PendingDeprecationWarning("test run"))
446 """.format(
447 mark=mark
448 )
449 )
450
451 @pytest.mark.parametrize("customize_filters", [True, False])
452 def test_shown_by_default(self, pytester: Pytester, customize_filters) -> None:

Callers 5

test_shown_by_defaultMethod · 0.95
test_hidden_by_iniMethod · 0.95
test_hidden_by_markMethod · 0.95
test_hidden_by_systemMethod · 0.95

Calls 2

makepyfileMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected