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
638
test_trial_testcase_todo_property
def
function
def test_trial_testcase_todo_property(self, pytester: Pytester) -> None: testpath = pytester.makepyfile( """ from twisted.trial import unittest class MyTestCase(unittest.TestCase): todo = 'dont run' def test_func(self): ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
639
makepyfile
ref
function
testpath = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
648
inline_run
ref
function
reprec = pytester.inline_run(testpath, "-s")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
649
assertoutcome
ref
function
reprec.assertoutcome(skipped=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
651
test_trial_testfunction_todo_property
def
function
def test_trial_testfunction_todo_property(self, pytester: Pytester) -> None: testpath = pytester.makepyfile( """ from twisted.trial import unittest class MyTestCase(unittest.TestCase): def test_func(self): assert 0 test_...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
652
makepyfile
ref
function
testpath = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
661
inline_run
ref
function
reprec = pytester.inline_run(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
664
assertoutcome
ref
function
reprec.assertoutcome(skipped=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
667
test_djangolike_testcase
def
function
def test_djangolike_testcase(pytester: Pytester) -> None: # contributed from Morten Breekevold pytester.makepyfile( """ from unittest import TestCase, main class DjangoLikeTestCase(TestCase): def setUp(self): print("setUp()") def test_presetup_h...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
669
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
712
runpytest
ref
function
result = pytester.runpytest("-s")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
714
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
725
test_unittest_not_shown_in_traceback
def
function
def test_unittest_not_shown_in_traceback(pytester: Pytester) -> None: pytester.makepyfile( """ import unittest class t(unittest.TestCase): def test_hello(self): x = 3 self.assertEqual(x, 4) """ ) res = pytester.runpytest() res.stdou...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
726
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
735
runpytest
ref
function
res = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
736
no_fnmatch_line
ref
function
res.stdout.no_fnmatch_line("*failUnlessEqual*")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
739
test_unorderable_types
def
function
def test_unorderable_types(pytester: Pytester) -> None: pytester.makepyfile( """ import unittest class TestJoinEmpty(unittest.TestCase): pass def make_test(): class Test(unittest.TestCase): pass Test.__name__ = "TestFoo" ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
740
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
754
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
755
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*TypeError*")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
759
test_unittest_typerror_traceback
def
function
def test_unittest_typerror_traceback(pytester: Pytester) -> None: pytester.makepyfile( """ import unittest class TestJoinEmpty(unittest.TestCase): def test_hello(self, arg1): pass """ ) result = pytester.runpytest() assert "TypeError" in result.std...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
760
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
768
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
773
parametrize
ref
function
@pytest.mark.parametrize("runner", ["pytest", "unittest"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
774
test_unittest_expected_failure_for_failing_test_is_xfail
def
function
def test_unittest_expected_failure_for_failing_test_is_xfail( pytester: Pytester, runner
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
777
makepyfile
ref
function
script = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
789
runpytest
ref
function
result = pytester.runpytest("-rxX")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
790
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
794
runpython
ref
function
result = pytester.runpython(script)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
795
fnmatch_lines
ref
function
result.stderr.fnmatch_lines(["*1 test in*", "*OK*(expected failures=1)*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
799
parametrize
ref
function
@pytest.mark.parametrize("runner", ["pytest", "unittest"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
800
test_unittest_expected_failure_for_passing_test_is_fail
def
function
def test_unittest_expected_failure_for_passing_test_is_fail( pytester: Pytester, runner: str,
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
804
makepyfile
ref
function
script = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
817
runpytest
ref
function
result = pytester.runpytest("-rxX")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
818
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
826
runpython
ref
function
result = pytester.runpython(script)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
827
fnmatch_lines
ref
function
result.stderr.fnmatch_lines(["*1 test in*", "*(unexpected successes=1)*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
832
parametrize
ref
function
@pytest.mark.parametrize("stmt", ["return", "yield"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
833
test_unittest_setup_interaction
def
function
def test_unittest_setup_interaction(pytester: Pytester, stmt: str) -> None: pytester.makepyfile( """ import unittest import pytest class MyTestCase(unittest.TestCase): @pytest.fixture(scope="class", autouse=_True) def perclass(self, request): r...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
834
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
861
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
862
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*3 passed*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
865
test_non_unittest_no_setupclass_support
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
866
makepyfile
ref
function
testpath = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
887
inline_run
ref
function
reprec = pytester.inline_run(testpath)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
888
assertoutcome
ref
function
reprec.assertoutcome(passed=2)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
891
test_no_teardown_if_setupclass_failed
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
892
makepyfile
ref
function
testpath = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
915
inline_run
ref
function
reprec = pytester.inline_run(testpath)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
916
assertoutcome
ref
function
reprec.assertoutcome(passed=1, failed=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
919
test_cleanup_functions
def
function
def test_cleanup_functions(pytester: Pytester) -> None: """Ensure functions added with addCleanup are always called after each test ends (#6947)""" pytester.makepyfile( """ import unittest cleanups = [] class Test(unittest.TestCase): def test_func_1(self): ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
921
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
940
runpytest
ref
function
result = pytester.runpytest("-v")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
941
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
950
test_issue333_result_clearing
def
function
def test_issue333_result_clearing(pytester: Pytester) -> None: pytester.makeconftest( """ import pytest @pytest.hookimpl(hookwrapper=_True) def pytest_runtest_call(item): yield assert 0 """ ) pytester.makepyfile( """ import unittest...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
951
makeconftest
ref
function
pytester.makeconftest(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
960
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
969
inline_run
ref
function
reprec = pytester.inline_run()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
970
assertoutcome
ref
function
reprec.assertoutcome(failed=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
974
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
983
runpytest
ref
function
result = pytester.runpytest("-v", "-rs")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
984
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
993
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,003
runpytest
ref
function
result = pytester.runpytest("-v", "-rs")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,004
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,012
test_class_method_containing_test_issue1558
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,013
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,025
inline_run
ref
function
reprec = pytester.inline_run()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,026
assertoutcome
ref
function
reprec.assertoutcome(passed=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,029
parametrize
ref
function
@pytest.mark.parametrize("base", ["builtins.object", "unittest.TestCase"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,033
importorskip
ref
function
pytest.importorskip(module)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,034
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,063
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,088
runpytest
ref
function
result = pytester.runpytest("-s")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,089
assert_outcomes
ref
function
result.assert_outcomes(passed=2)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,097
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,108
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,115
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,116
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,125
parametrize
ref
function
@pytest.mark.parametrize(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,137
copy_example
ref
function
pytester.copy_example(f"unittest/{test_name}")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,138
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,139
fnmatch_lines
ref
function
result.stdout.fnmatch_lines([f"* {expected_outcome} in *"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,143
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,156
inline_run
ref
function
reprec = pytester.inline_run()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,157
assertoutcome
ref
function
reprec.assertoutcome(failed=1, passed=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,161
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_unittest.py
testing/test_unittest.py
1,174
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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 ...