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_unittest.py
testing/test_unittest.py
1,181
check_call
def
function
def check_call(*args, **kwargs): calls.append((args, kwargs)) assert args == ("runcall",) class _pdb: def runcall(*args, **kwargs): calls.append((args, kwargs)) return _pdb monkeypatch.setattr("_pytest.debugging.pytestPDB._init_pdb", check_call) ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,185
_pdb
def
class
runcall
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,186
runcall
def
function
def runcall(*args, **kwargs): calls.append((args, kwargs)) return _pdb monkeypatch.setattr("_pytest.debugging.pytestPDB._init_pdb", check_call) p1 = pytester.makepyfile( """ import unittest class MyTestCase(unittest.TestCase): def test(...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,193
makepyfile
ref
function
p1 = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,202
runpytest
ref
function
result = pytester.runpytest("--trace", str(p1))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,207
test_pdb_teardown_called
def
function
def test_pdb_teardown_called(pytester: Pytester, monkeypatch: MonkeyPatch) -> None: """Ensure tearDown() is always called when --pdb is given in the command-line. We delay the normal tearDown() calls when --pdb is given, so this ensures we are calling tearDown() eventually to avoid memory leaks when using ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,218
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,234
runpytest_inprocess
ref
function
result = pytester.runpytest_inprocess("--pdb")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,235
fnmatch_lines
ref
function
result.stdout.fnmatch_lines("* 2 passed in *")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,242
parametrize
ref
function
@pytest.mark.parametrize("mark", ["@unittest.skip", "@pytest.mark.skip"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,243
test_pdb_teardown_skipped
def
function
def test_pdb_teardown_skipped( pytester: Pytester, monkeypatch: MonkeyPatch, mark: str
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,250
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,271
runpytest_inprocess
ref
function
result = pytester.runpytest_inprocess("--pdb")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,272
fnmatch_lines
ref
function
result.stdout.fnmatch_lines("* 1 skipped in *")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,276
test_async_support
def
function
def test_async_support(pytester: Pytester) -> None: pytest.importorskip("unittest.async_case") pytester.copy_example("unittest/test_unittest_asyncio.py") reprec = pytester.inline_run() reprec.assertoutcome(failed=1, passed=2)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,277
importorskip
ref
function
pytest.importorskip("unittest.async_case")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,279
copy_example
ref
function
pytester.copy_example("unittest/test_unittest_asyncio.py")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,280
inline_run
ref
function
reprec = pytester.inline_run()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,281
assertoutcome
ref
function
reprec.assertoutcome(failed=1, passed=2)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,284
test_asynctest_support
def
function
def test_asynctest_support(pytester: Pytester) -> None: """Check asynctest support (#7110)""" pytest.importorskip("asynctest") pytester.copy_example("unittest/test_unittest_asynctest.py") reprec = pytester.inline_run() reprec.assertoutcome(failed=1, passed=2)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,286
importorskip
ref
function
pytest.importorskip("asynctest")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,288
copy_example
ref
function
pytester.copy_example("unittest/test_unittest_asynctest.py")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,289
inline_run
ref
function
reprec = pytester.inline_run()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,290
assertoutcome
ref
function
reprec.assertoutcome(failed=1, passed=2)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,293
test_plain_unittest_does_not_support_async
def
function
def test_plain_unittest_does_not_support_async(pytester: Pytester) -> None: """Async functions in plain unittest.TestCase subclasses are not supported without plugins. This test exists here to avoid introducing this support by accident, leading users to expect that it works, rather than doing so intentiona...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,301
copy_example
ref
function
pytester.copy_example("unittest/test_unittest_plain_async.py")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,302
runpytest_subprocess
ref
function
result = pytester.runpytest_subprocess()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,313
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(expected_lines)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,316
skipif
ref
function
@pytest.mark.skipif(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,319
test_do_class_cleanups_on_success
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,320
makepyfile
ref
function
testpath = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,338
inline_run
ref
function
reprec = pytester.inline_run(testpath)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,339
countoutcomes
ref
function
passed, skipped, failed = reprec.countoutcomes()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,344
skipif
ref
function
@pytest.mark.skipif(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,347
test_do_class_cleanups_on_setupclass_failure
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,348
makepyfile
ref
function
testpath = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,365
inline_run
ref
function
reprec = pytester.inline_run(testpath)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,366
countoutcomes
ref
function
passed, skipped, failed = reprec.countoutcomes()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,371
skipif
ref
function
@pytest.mark.skipif(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,374
test_do_class_cleanups_on_teardownclass_failure
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,375
makepyfile
ref
function
testpath = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,396
inline_run
ref
function
reprec = pytester.inline_run(testpath)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,397
countoutcomes
ref
function
passed, skipped, failed = reprec.countoutcomes()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,401
test_do_cleanups_on_success
def
function
def test_do_cleanups_on_success(pytester: Pytester) -> None: testpath = pytester.makepyfile( """ import unittest class MyTestCase(unittest.TestCase): values = [] def setUp(self): def cleanup(): self.values.append(1) ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,402
makepyfile
ref
function
testpath = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,419
inline_run
ref
function
reprec = pytester.inline_run(testpath)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,420
countoutcomes
ref
function
passed, skipped, failed = reprec.countoutcomes()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,425
test_do_cleanups_on_setup_failure
def
function
def test_do_cleanups_on_setup_failure(pytester: Pytester) -> None: testpath = pytester.makepyfile( """ import unittest class MyTestCase(unittest.TestCase): values = [] def setUp(self): def cleanup(): self.values.append(1) ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,426
makepyfile
ref
function
testpath = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,444
inline_run
ref
function
reprec = pytester.inline_run(testpath)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,445
countoutcomes
ref
function
passed, skipped, failed = reprec.countoutcomes()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,450
test_do_cleanups_on_teardown_failure
def
function
def test_do_cleanups_on_teardown_failure(pytester: Pytester) -> None: testpath = pytester.makepyfile( """ import unittest class MyTestCase(unittest.TestCase): values = [] def setUp(self): def cleanup(): self.values.append(1) ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,451
makepyfile
ref
function
testpath = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,470
inline_run
ref
function
reprec = pytester.inline_run(testpath)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,471
countoutcomes
ref
function
passed, skipped, failed = reprec.countoutcomes()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unraisableexception.py
testing/test_unraisableexception.py
7
skip
ref
function
pytest.skip("unraisableexception plugin needs Python>=3.8", allow_module_level=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unraisableexception.py
testing/test_unraisableexception.py
10
filterwarnings
ref
function
@pytest.mark.filterwarnings("default::pytest.PytestUnraisableExceptionWarning")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unraisableexception.py
testing/test_unraisableexception.py
11
test_unraisable
def
function
def test_unraisable(pytester: Pytester) -> None: pytester.makepyfile( test_it=""" class BrokenDel: def __del__(self): raise ValueError("del is broken") def test_it(): obj = BrokenDel() del obj def test_2(): pass """ ) ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unraisableexception.py
testing/test_unraisableexception.py
12
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unraisableexception.py
testing/test_unraisableexception.py
25
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unraisableexception.py
testing/test_unraisableexception.py
27
parseoutcomes
ref
function
assert result.parseoutcomes() == {"passed": 2, "warnings": 1}
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unraisableexception.py
testing/test_unraisableexception.py
28
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unraisableexception.py
testing/test_unraisableexception.py
42
filterwarnings
ref
function
@pytest.mark.filterwarnings("default::pytest.PytestUnraisableExceptionWarning")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unraisableexception.py
testing/test_unraisableexception.py
43
test_unraisable_in_setup
def
function
def test_unraisable_in_setup(pytester: Pytester) -> None: pytester.makepyfile( test_it=""" import pytest class BrokenDel: def __del__(self): raise ValueError("del is broken") @pytest.fixture def broken_del(): obj = BrokenDel() ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unraisableexception.py
testing/test_unraisableexception.py
44
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unraisableexception.py
testing/test_unraisableexception.py
61
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unraisableexception.py
testing/test_unraisableexception.py
63
parseoutcomes
ref
function
assert result.parseoutcomes() == {"passed": 2, "warnings": 1}
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unraisableexception.py
testing/test_unraisableexception.py
64
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unraisableexception.py
testing/test_unraisableexception.py
78
filterwarnings
ref
function
@pytest.mark.filterwarnings("default::pytest.PytestUnraisableExceptionWarning")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unraisableexception.py
testing/test_unraisableexception.py
79
test_unraisable_in_teardown
def
function
def test_unraisable_in_teardown(pytester: Pytester) -> None: pytester.makepyfile( test_it=""" import pytest class BrokenDel: def __del__(self): raise ValueError("del is broken") @pytest.fixture def broken_del(): yield obj ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unraisableexception.py
testing/test_unraisableexception.py
80
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unraisableexception.py
testing/test_unraisableexception.py
98
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unraisableexception.py
testing/test_unraisableexception.py
100
parseoutcomes
ref
function
assert result.parseoutcomes() == {"passed": 2, "warnings": 1}
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unraisableexception.py
testing/test_unraisableexception.py
101
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unraisableexception.py
testing/test_unraisableexception.py
115
filterwarnings
ref
function
@pytest.mark.filterwarnings("error::pytest.PytestUnraisableExceptionWarning")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unraisableexception.py
testing/test_unraisableexception.py
116
test_unraisable_warning_error
def
function
def test_unraisable_warning_error(pytester: Pytester) -> None: pytester.makepyfile( test_it=""" class BrokenDel: def __del__(self) -> None: raise ValueError("del is broken") def test_it() -> None: obj = BrokenDel() del obj def tes...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unraisableexception.py
testing/test_unraisableexception.py
117
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unraisableexception.py
testing/test_unraisableexception.py
130
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unraisableexception.py
testing/test_unraisableexception.py
132
parseoutcomes
ref
function
assert result.parseoutcomes() == {"passed": 1, "failed": 1}
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warning_types.py
testing/test_warning_types.py
7
parametrize
ref
function
@pytest.mark.parametrize(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warning_types.py
testing/test_warning_types.py
15
test_warning_types
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warning_types.py
testing/test_warning_types.py
22
filterwarnings
ref
function
@pytest.mark.filterwarnings("error::pytest.PytestWarning")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warning_types.py
testing/test_warning_types.py
23
test_pytest_warnings_repr_integration_test
def
function
def test_pytest_warnings_repr_integration_test(pytester: Pytester) -> None: """Small integration test to ensure our small hack of setting the __module__ attribute of our warnings actually works (#5452). """ pytester.makepyfile( """ import pytest import warnings def test(...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warning_types.py
testing/test_warning_types.py
27
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warning_types.py
testing/test_warning_types.py
36
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warning_types.py
testing/test_warning_types.py
37
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["E pytest.PytestWarning: some warning"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py
testing/test_warnings.py
14
pyfile_with_warnings
def
function
def pyfile_with_warnings(pytester: Pytester, request: FixtureRequest) -> str: """Create a test file which calls a function in a module which generates warnings.""" pytester.syspathinsert() test_name = request.function.__name__ module_name = test_name.lstrip("test_") + "_module" test_file = pytester....
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py
testing/test_warnings.py
16
syspathinsert
ref
function
pytester.syspathinsert()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py
testing/test_warnings.py
19
makepyfile
ref
function
test_file = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py
testing/test_warnings.py
40
filterwarnings
ref
function
@pytest.mark.filterwarnings("default::UserWarning", "default::RuntimeWarning")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py
testing/test_warnings.py
41
test_normal_flow
def
function
def test_normal_flow(pytester: Pytester, pyfile_with_warnings) -> None: """Check that the warnings section is displayed.""" result = pytester.runpytest(pyfile_with_warnings) result.stdout.fnmatch_lines( [ "*== %s ==*" % WARNINGS_SUMMARY_HEADER, "test_normal_flow.py::test_func...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py
testing/test_warnings.py
43
runpytest
ref
function
result = pytester.runpytest(pyfile_with_warnings)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py
testing/test_warnings.py
44
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py
testing/test_warnings.py
57
filterwarnings
ref
function
@pytest.mark.filterwarnings("always::UserWarning")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py
testing/test_warnings.py
58
test_setup_teardown_warnings
def
function
def test_setup_teardown_warnings(pytester: Pytester) -> None: pytester.makepyfile( """ import warnings import pytest @pytest.fixture def fix(): warnings.warn(UserWarning("warning during setup")) yield warnings.warn(UserWarning("warning dur...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py
testing/test_warnings.py
59
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py
testing/test_warnings.py
74
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py
testing/test_warnings.py
75
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py
testing/test_warnings.py
87
parametrize
ref
function
@pytest.mark.parametrize("method", ["cmdline", "ini"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_warnings.py
testing/test_warnings.py
88
test_as_errors
def
function
def test_as_errors(pytester: Pytester, pyfile_with_warnings, method) -> None: args = ("-W", "error") if method == "cmdline" else () if method == "ini": pytester.makeini( """ [pytest] filterwarnings=error """ ) # Use a subprocess, since changing...