fname stringlengths 63 176 | rel_fname stringclasses 706
values | line int64 -1 4.5k | name stringlengths 1 81 | kind stringclasses 2
values | category stringclasses 2
values | info stringlengths 0 77.9k ⌀ |
|---|---|---|---|---|---|---|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 91 | makeini | ref | function | pytester.makeini(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 99 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess(*args, pyfile_with_warnings)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 100 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 109 | parametrize | ref | function | @pytest.mark.parametrize("method", ["cmdline", "ini"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 110 | test_ignore | def | function | def test_ignore(pytester: Pytester, pyfile_with_warnings, method) -> None:
args = ("-W", "ignore") if method == "cmdline" else ()
if method == "ini":
pytester.makeini(
"""
[pytest]
filterwarnings= ignore
"""
)
result = pytester.runpytest(*args, pyfile_wit... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 113 | makeini | ref | function | pytester.makeini(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 120 | runpytest | ref | function | result = pytester.runpytest(*args, pyfile_with_warnings)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 121 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["* 1 passed in *"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 125 | filterwarnings | ref | function | @pytest.mark.filterwarnings("always::UserWarning")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 126 | test_unicode | def | function | def test_unicode(pytester: Pytester) -> None:
pytester.makepyfile(
"""
import warnings
import pytest
@pytest.fixture
def fix():
warnings.warn("测试")
yield
def test_func(fix):
pass
"""
)
result = pytester.runpytest(... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 127 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 142 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 143 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 152 | test_works_with_filterwarnings | def | function | def test_works_with_filterwarnings(pytester: Pytester) -> None:
"""Ensure our warnings capture does not mess with pre-installed filters (#2430)."""
pytester.makepyfile(
"""
import warnings
class MyWarning(Warning):
pass
warnings.filterwarnings("error", category=MyWa... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 154 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 172 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 173 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*== 1 passed in *"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 176 | parametrize | ref | function | @pytest.mark.parametrize("default_config", ["ini", "cmdline"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 177 | test_filterwarnings_mark | def | function | def test_filterwarnings_mark(pytester: Pytester, default_config) -> None:
"""Test ``filterwarnings`` mark works and takes precedence over command
line and ini options."""
if default_config == "ini":
pytester.makeini(
"""
[pytest]
filterwarnings = always::RuntimeWa... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 181 | makeini | ref | function | pytester.makeini(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 187 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 204 | runpytest | ref | function | result = pytester.runpytest(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 207 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*= 1 failed, 2 passed, 1 warning in *"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 210 | test_non_string_warning_argument | def | function | def test_non_string_warning_argument(pytester: Pytester) -> None:
"""Non-str argument passed to warning breaks pytest (#2956)"""
pytester.makepyfile(
"""\
import warnings
import pytest
def test():
warnings.warn(UserWarning(1, 'foo'))
"""
)
result = py... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 212 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 221 | runpytest | ref | function | result = pytester.runpytest("-W", "always::UserWarning")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 222 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*= 1 passed, 1 warning in *"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 225 | test_filterwarnings_mark_registration | def | function | def test_filterwarnings_mark_registration(pytester: Pytester) -> None:
"""Ensure filterwarnings mark is registered"""
pytester.makepyfile(
"""
import pytest
@pytest.mark.filterwarnings('error')
def test_func():
pass
"""
)
result = pytester.runpytest("--st... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 227 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 236 | runpytest | ref | function | result = pytester.runpytest("--strict-markers")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 240 | filterwarnings | ref | function | @pytest.mark.filterwarnings("always::UserWarning")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 241 | test_warning_captured_hook | def | function | def test_warning_captured_hook(pytester: Pytester) -> None:
pytester.makeconftest(
"""
def pytest_configure(config):
config.issue_config_time_warning(UserWarning("config warning"), stacklevel=2)
"""
)
pytester.makepyfile(
"""
import pytest, warnings
w... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 242 | makeconftest | ref | function | pytester.makeconftest(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 248 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 268 | WarningCollector | def | class | pytest_warning_recorded |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 269 | pytest_warning_recorded | def | function | def pytest_warning_recorded(self, warning_message, when, nodeid, location):
collected.append((str(warning_message.message), when, nodeid, location))
result = pytester.runpytest(plugins=[WarningCollector()])
result.stdout.fnmatch_lines(["*1 passed*"])
expected = [
("config warni... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 272 | runpytest | ref | function | result = pytester.runpytest(plugins=[WarningCollector()])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 272 | WarningCollector | ref | function | result = pytester.runpytest(plugins=[WarningCollector()])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 273 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*1 passed*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 301 | filterwarnings | ref | function | @pytest.mark.filterwarnings("always::UserWarning")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 302 | test_collection_warnings | def | function | def test_collection_warnings(pytester: Pytester) -> None:
"""Check that we also capture warnings issued during test collection (#3251)."""
pytester.makepyfile(
"""
import warnings
warnings.warn(UserWarning("collection warning"))
def test_foo():
pass
"""
)
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 304 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 314 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 315 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 325 | filterwarnings | ref | function | @pytest.mark.filterwarnings("always::UserWarning")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 326 | test_mark_regex_escape | def | function | def test_mark_regex_escape(pytester: Pytester) -> None:
"""@pytest.mark.filterwarnings should not try to escape regex characters (#3936)"""
pytester.makepyfile(
r"""
import pytest, warnings
@pytest.mark.filterwarnings(r"ignore:some \(warning\)")
def test_foo():
warni... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 328 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 337 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 341 | filterwarnings | ref | function | @pytest.mark.filterwarnings("default::pytest.PytestWarning")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 342 | parametrize | ref | function | @pytest.mark.parametrize("ignore_pytest_warnings", ["no", "ini", "cmdline"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 343 | test_hide_pytest_internal_warnings | def | function | def test_hide_pytest_internal_warnings(
pytester: Pytester, ignore_pytest_warnings
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 347 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 359 | makeini | ref | function | pytester.makeini(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 370 | runpytest | ref | function | result = pytester.runpytest(*args)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 374 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 383 | parametrize | ref | function | @pytest.mark.parametrize("ignore_on_cmdline", [True, False])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 384 | test_option_precedence_cmdline_over_ini | def | function | def test_option_precedence_cmdline_over_ini(
pytester: Pytester, ignore_on_cmdline
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 388 | makeini | ref | function | pytester.makeini(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 394 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 402 | runpytest | ref | function | result = pytester.runpytest(*args)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 404 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["* 1 passed in*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 406 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["* 1 failed in*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 409 | test_option_precedence_mark | def | function | def test_option_precedence_mark(pytester: Pytester) -> None:
"""Filters defined by marks should always take precedence (#3946)."""
pytester.makeini(
"""
[pytest]
filterwarnings = ignore
"""
)
pytester.makepyfile(
"""
import pytest, warnings
@pytest.mar... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 411 | makeini | ref | function | pytester.makeini(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 417 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 425 | runpytest | ref | function | result = pytester.runpytest("-W", "ignore")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 426 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["* 1 failed in*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 429 | TestDeprecationWarningsByDefault | def | class | create_file test_shown_by_default test_hidden_by_ini test_hidden_by_mark test_hidden_by_cmdline test_hidden_by_system |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 435 | create_file | def | function | def create_file(self, pytester: Pytester, mark="") -> None:
pytester.makepyfile(
"""
import pytest, warnings
warnings.warn(DeprecationWarning("collection"))
{mark}
def test_foo():
warnings.warn(PendingDeprecationWarning("test run"... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 436 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 450 | parametrize | ref | function | @pytest.mark.parametrize("customize_filters", [True, False])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 451 | test_shown_by_default | def | function | def test_shown_by_default(self, pytester: Pytester, customize_filters) -> None:
"""Show deprecation warnings by default, even if user has customized the warnings filters (#4013)."""
self.create_file(pytester)
if customize_filters:
pytester.makeini(
"""
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 453 | create_file | ref | function | self.create_file(pytester)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 455 | makeini | ref | function | pytester.makeini(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 462 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 463 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 472 | test_hidden_by_ini | def | function | def test_hidden_by_ini(self, pytester: Pytester) -> None:
self.create_file(pytester)
pytester.makeini(
"""
[pytest]
filterwarnings =
ignore::DeprecationWarning
ignore::PendingDeprecationWarning
"""
)
result =... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 473 | create_file | ref | function | self.create_file(pytester)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 474 | makeini | ref | function | pytester.makeini(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 482 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 485 | test_hidden_by_mark | def | function | def test_hidden_by_mark(self, pytester: Pytester) -> None:
"""Should hide the deprecation warning from the function, but the warning during collection should
be displayed normally.
"""
self.create_file(
pytester,
mark='@pytest.mark.filterwarnings("ignore::Pend... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 489 | create_file | ref | function | self.create_file(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 493 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 494 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 502 | test_hidden_by_cmdline | def | function | def test_hidden_by_cmdline(self, pytester: Pytester) -> None:
self.create_file(pytester)
result = pytester.runpytest_subprocess(
"-W",
"ignore::DeprecationWarning",
"-W",
"ignore::PendingDeprecationWarning",
)
assert WARNINGS_SUMMARY_HE... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 503 | create_file | ref | function | self.create_file(pytester)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 504 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 512 | test_hidden_by_system | def | function | def test_hidden_by_system(self, pytester: Pytester, monkeypatch) -> None:
self.create_file(pytester)
monkeypatch.setenv("PYTHONWARNINGS", "once::UserWarning")
result = pytester.runpytest_subprocess()
assert WARNINGS_SUMMARY_HEADER not in result.stdout.str()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 513 | create_file | ref | function | self.create_file(pytester)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 514 | setenv | ref | function | monkeypatch.setenv("PYTHONWARNINGS", "once::UserWarning")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 515 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 519 | parametrize | ref | function | @pytest.mark.parametrize("change_default", [None, "ini", "cmdline"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 520 | test_removed_in_x_warning_as_error | def | function | def test_removed_in_x_warning_as_error(pytester: Pytester, change_default) -> None:
"""This ensures that PytestRemovedInXWarnings raised by pytest are turned into errors.
This test should be enabled as part of each major release, and skipped again afterwards
to ensure our deprecations are turning into warn... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 526 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 534 | makeini | ref | function | pytester.makeini(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 547 | runpytest | ref | function | result = pytester.runpytest(*args)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 549 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["* 1 failed in *"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 552 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["* 1 passed in *"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 555 | TestAssertionWarnings | def | class | assert_result_warns test_tuple_warning |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py | testing/test_warnings.py | 557 | assert_result_warns | def | function | def assert_result_warns(result, msg) -> None:
result.stdout.fnmatch_lines(["*PytestAssertRewriteWarning: %s*" % msg])
def test_tuple_warning(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""\
def test_foo():
assert (1,2)
"""
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.