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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 973 | test_unittest_raise_skip_issue748 | def | function | def test_unittest_raise_skip_issue748(pytester: Pytester) -> None:
pytester.makepyfile(
test_foo="""
import unittest
class MyTestCase(unittest.TestCase):
def test_one(self):
raise unittest.SkipTest('skipping due to reasons')
"""
)
result = pytester.ru... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 974 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 983 | runpytest | ref | function | result = pytester.runpytest("-v", "-rs")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 984 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 992 | test_unittest_skip_issue1169 | def | function | def test_unittest_skip_issue1169(pytester: Pytester) -> None:
pytester.makepyfile(
test_foo="""
import unittest
class MyTestCase(unittest.TestCase):
@unittest.skip("skipping due to reasons")
def test_skip(self):
self.fail()
"""
)
resu... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 993 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,003 | runpytest | ref | function | result = pytester.runpytest("-v", "-rs")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,004 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,012 | test_class_method_containing_test_issue1558 | def | class | |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,013 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,025 | inline_run | ref | function | reprec = pytester.inline_run()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,026 | assertoutcome | ref | function | reprec.assertoutcome(passed=1)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,029 | parametrize | ref | function | @pytest.mark.parametrize("base", ["builtins.object", "unittest.TestCase"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,030 | test_usefixtures_marker_on_unittest | def | function | def test_usefixtures_marker_on_unittest(base, pytester: Pytester) -> None:
"""#3498"""
module = base.rsplit(".", 1)[0]
pytest.importorskip(module)
pytester.makepyfile(
conftest="""
import pytest
@pytest.fixture(scope='function')
def fixture1(request, monkeypatch):
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,033 | importorskip | ref | function | pytest.importorskip(module)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,034 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,063 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,088 | runpytest | ref | function | result = pytester.runpytest("-s")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,089 | assert_outcomes | ref | function | result.assert_outcomes(passed=2)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,092 | test_testcase_handles_init_exceptions | def | function | def test_testcase_handles_init_exceptions(pytester: Pytester) -> None:
"""
Regression test to make sure exceptions in the __init__ method are bubbled up correctly.
See https://github.com/pytest-dev/pytest/issues/3788
"""
pytester.makepyfile(
"""
from unittest import TestCase
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,097 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,108 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,110 | no_fnmatch_line | ref | function | result.stdout.no_fnmatch_line("*ERROR at teardown of MyTestCase.test_hello*")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,113 | test_error_message_with_parametrized_fixtures | def | function | def test_error_message_with_parametrized_fixtures(pytester: Pytester) -> None:
pytester.copy_example("unittest/test_parametrized_fixture_error_message.py")
result = pytester.runpytest()
result.stdout.fnmatch_lines(
[
"*test_two does not support fixtures*",
"*TestSomethingElse... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,114 | copy_example | ref | function | pytester.copy_example("unittest/test_parametrized_fixture_error_message.py")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,115 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,116 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,125 | parametrize | ref | function | @pytest.mark.parametrize(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,133 | test_setup_inheritance_skipping | def | function | def test_setup_inheritance_skipping(
pytester: Pytester, test_name, expected_outcome
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,137 | copy_example | ref | function | pytester.copy_example(f"unittest/{test_name}")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,138 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,139 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines([f"* {expected_outcome} in *"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,142 | test_BdbQuit | def | function | def test_BdbQuit(pytester: Pytester) -> None:
pytester.makepyfile(
test_foo="""
import unittest
class MyTestCase(unittest.TestCase):
def test_bdbquit(self):
import bdb
raise bdb.BdbQuit()
def test_should_not_run(self):
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,143 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,156 | inline_run | ref | function | reprec = pytester.inline_run()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,157 | assertoutcome | ref | function | reprec.assertoutcome(failed=1, passed=1)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,160 | test_exit_outcome | def | function | def test_exit_outcome(pytester: Pytester) -> None:
pytester.makepyfile(
test_foo="""
import pytest
import unittest
class MyTestCase(unittest.TestCase):
def test_exit_outcome(self):
pytest.exit("pytest_exit called")
def test_should_not_run(sel... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,161 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,174 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,175 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*Exit: pytest_exit called*", "*= no tests ran in *"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,178 | test_trace | def | function | def test_trace(pytester: Pytester, monkeypatch: MonkeyPatch) -> None:
calls = []
def check_call(*args, **kwargs):
calls.append((args, kwargs))
assert args == ("runcall",)
class _pdb:
def runcall(*args, **kwargs):
calls.append((args, kwargs))
return ... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,185 | _pdb | def | class | runcall |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,193 | makepyfile | ref | function | p1 = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,202 | runpytest | ref | function | result = pytester.runpytest("--trace", str(p1))
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,218 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,234 | runpytest_inprocess | ref | function | result = pytester.runpytest_inprocess("--pdb")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,235 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines("* 2 passed in *")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,242 | parametrize | ref | function | @pytest.mark.parametrize("mark", ["@unittest.skip", "@pytest.mark.skip"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,250 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,271 | runpytest_inprocess | ref | function | result = pytester.runpytest_inprocess("--pdb")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,272 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines("* 1 skipped in *")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,277 | importorskip | ref | function | pytest.importorskip("unittest.async_case")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,279 | copy_example | ref | function | pytester.copy_example("unittest/test_unittest_asyncio.py")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,280 | inline_run | ref | function | reprec = pytester.inline_run()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,281 | assertoutcome | ref | function | reprec.assertoutcome(failed=1, passed=2)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,286 | importorskip | ref | function | pytest.importorskip("asynctest")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,288 | copy_example | ref | function | pytester.copy_example("unittest/test_unittest_asynctest.py")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,289 | inline_run | ref | function | reprec = pytester.inline_run()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,290 | assertoutcome | ref | function | reprec.assertoutcome(failed=1, passed=2)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,302 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,313 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(expected_lines)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,316 | skipif | ref | function | @pytest.mark.skipif(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,319 | test_do_class_cleanups_on_success | def | class | |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,320 | makepyfile | ref | function | testpath = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,338 | inline_run | ref | function | reprec = pytester.inline_run(testpath)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,339 | countoutcomes | ref | function | passed, skipped, failed = reprec.countoutcomes()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,344 | skipif | ref | function | @pytest.mark.skipif(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,347 | test_do_class_cleanups_on_setupclass_failure | def | class | |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,348 | makepyfile | ref | function | testpath = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,365 | inline_run | ref | function | reprec = pytester.inline_run(testpath)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,366 | countoutcomes | ref | function | passed, skipped, failed = reprec.countoutcomes()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,371 | skipif | ref | function | @pytest.mark.skipif(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,374 | test_do_class_cleanups_on_teardownclass_failure | def | class | |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,375 | makepyfile | ref | function | testpath = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,396 | inline_run | ref | function | reprec = pytester.inline_run(testpath)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,397 | countoutcomes | ref | function | passed, skipped, failed = reprec.countoutcomes()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,402 | makepyfile | ref | function | testpath = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,419 | inline_run | ref | function | reprec = pytester.inline_run(testpath)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,420 | countoutcomes | ref | function | passed, skipped, failed = reprec.countoutcomes()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,426 | makepyfile | ref | function | testpath = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,444 | inline_run | ref | function | reprec = pytester.inline_run(testpath)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,445 | countoutcomes | ref | function | passed, skipped, failed = reprec.countoutcomes()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,451 | makepyfile | ref | function | testpath = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,470 | inline_run | ref | function | reprec = pytester.inline_run(testpath)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unittest.py | testing/test_unittest.py | 1,471 | countoutcomes | ref | function | passed, skipped, failed = reprec.countoutcomes()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unraisableexception.py | testing/test_unraisableexception.py | 10 | filterwarnings | ref | function | @pytest.mark.filterwarnings("default::pytest.PytestUnraisableExceptionWarning")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_unraisableexception.py | testing/test_unraisableexception.py | 12 | makepyfile | ref | function | pytester.makepyfile(
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.