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_collection.py | testing/test_collection.py | 728 | makeini | ref | function | pytester.makeini(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 735 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 746 | inline_genitems | ref | function | items, reprec = pytester.inline_genitems(p)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 747 | getmodpath | ref | function | ids = [x.getmodpath() for x in items] # type: ignore[attr-defined]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 751 | test_matchnodes_two_collections_same_file | def | function | def test_matchnodes_two_collections_same_file(pytester: Pytester) -> None:
pytester.makeconftest(
"""
import pytest
def pytest_configure(config):
config.pluginmanager.register(Plugin2())
class Plugin2(object):
def pytest_collect_file(self, fspath, parent):
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 752 | makeconftest | ref | function | pytester.makeconftest(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 784 | makefile | ref | function | p = pytester.makefile(".abc", "")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 785 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 787 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*2 passed*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 788 | runpytest | ref | function | res = pytester.runpytest("%s::item2" % p.name)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 789 | fnmatch_lines | ref | function | res.stdout.fnmatch_lines(["*1 passed*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 792 | TestNodeKeywords | def | class | test_no_under test_issue345 test_keyword_matching_is_case_insensitive_by_default test_duplicates_handled_correctly |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 793 | test_no_under | def | function | def test_no_under(self, pytester: Pytester) -> None:
modcol = pytester.getmodulecol(
"""
def test_pass(): pass
def test_fail(): assert 0
"""
)
values = list(modcol.keywords)
assert modcol.name in values
for x in values:
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 794 | getmodulecol | ref | function | modcol = pytester.getmodulecol(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 806 | test_issue345 | def | function | def test_issue345(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""
def test_should_not_be_selected():
assert _False, 'I should not have been selected to run'
def test___repr__():
pass
"""
)
reprec = pytes... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 807 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 816 | inline_run | ref | function | reprec = pytester.inline_run("-k repr")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 817 | assertoutcome | ref | function | reprec.assertoutcome(passed=1, failed=0)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 819 | test_keyword_matching_is_case_insensitive_by_default | def | function | def test_keyword_matching_is_case_insensitive_by_default(
self, pytester: Pytester
) -> None:
"""Check that selection via -k EXPRESSION is case-insensitive.
Since markers are also added to the node keywords, they too can
be matched without having to think about case sensitivity.... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 828 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 855 | inline_run | ref | function | reprec = pytester.inline_run("-k " + expression)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 856 | assertoutcome | ref | function | reprec.assertoutcome(passed=num_matching_tests, failed=0)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 858 | test_duplicates_handled_correctly | def | function | def test_duplicates_handled_correctly(self, pytester: Pytester) -> None:
item = pytester.getitem(
"""
import pytest
pytestmark = pytest.mark.kw
class TestClass:
pytestmark = pytest.mark.kw
def test_method(self): pass
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 859 | getitem | ref | function | item = pytester.getitem(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 899 | test_exit_on_collection_error | def | function | def test_exit_on_collection_error(pytester: Pytester) -> None:
"""Verify that all collection errors are collected and no tests executed"""
pytester.makepyfile(**COLLECTION_ERROR_PY_FILES)
res = pytester.runpytest()
assert res.ret == 2
res.stdout.fnmatch_lines(
[
"collected 2 it... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 901 | makepyfile | ref | function | pytester.makepyfile(**COLLECTION_ERROR_PY_FILES)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 903 | runpytest | ref | function | res = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 906 | fnmatch_lines | ref | function | res.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 917 | test_exit_on_collection_with_maxfail_smaller_than_n_errors | def | function | def test_exit_on_collection_with_maxfail_smaller_than_n_errors(
pytester: Pytester,
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 924 | makepyfile | ref | function | pytester.makepyfile(**COLLECTION_ERROR_PY_FILES)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 926 | runpytest | ref | function | res = pytester.runpytest("--maxfail=1")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 928 | fnmatch_lines | ref | function | res.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 937 | no_fnmatch_line | ref | function | res.stdout.no_fnmatch_line("*test_03*")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 940 | test_exit_on_collection_with_maxfail_bigger_than_n_errors | def | function | def test_exit_on_collection_with_maxfail_bigger_than_n_errors(
pytester: Pytester,
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 947 | makepyfile | ref | function | pytester.makepyfile(**COLLECTION_ERROR_PY_FILES)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 949 | runpytest | ref | function | res = pytester.runpytest("--maxfail=4")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 951 | fnmatch_lines | ref | function | res.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 964 | test_continue_on_collection_errors | def | function | def test_continue_on_collection_errors(pytester: Pytester) -> None:
"""
Verify tests are executed even when collection errors occur when the
--continue-on-collection-errors flag is set
"""
pytester.makepyfile(**COLLECTION_ERROR_PY_FILES)
res = pytester.runpytest("--continue-on-collection-errors... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 969 | makepyfile | ref | function | pytester.makepyfile(**COLLECTION_ERROR_PY_FILES)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 971 | runpytest | ref | function | res = pytester.runpytest("--continue-on-collection-errors")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 974 | fnmatch_lines | ref | function | res.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 979 | test_continue_on_collection_errors_maxfail | def | function | def test_continue_on_collection_errors_maxfail(pytester: Pytester) -> None:
"""
Verify tests are executed even when collection errors occur and that maxfail
is honoured (including the collection error count).
4 tests: 2 collection errors + 1 failure + 1 success
test_4 is never executed because the t... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 987 | makepyfile | ref | function | pytester.makepyfile(**COLLECTION_ERROR_PY_FILES)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 989 | runpytest | ref | function | res = pytester.runpytest("--continue-on-collection-errors", "--maxfail=3")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 992 | fnmatch_lines | ref | function | res.stdout.fnmatch_lines(["collected 2 items / 2 errors", "*1 failed, 2 errors*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 995 | test_fixture_scope_sibling_conftests | def | function | def test_fixture_scope_sibling_conftests(pytester: Pytester) -> None:
"""Regression test case for https://github.com/pytest-dev/pytest/issues/2836"""
foo_path = pytester.mkdir("foo")
foo_path.joinpath("conftest.py").write_text(
textwrap.dedent(
"""\
import pytest
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,011 | mkpydir | ref | function | food_path = pytester.mkpydir("food")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,014 | runpytest | ref | function | res = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,017 | fnmatch_lines | ref | function | res.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,026 | test_collect_init_tests | def | function | def test_collect_init_tests(pytester: Pytester) -> None:
"""Check that we collect files from __init__.py files when they patch the 'python_files' (#3773)"""
p = pytester.copy_example("collect/collect_init_tests")
result = pytester.runpytest(p, "--collect-only")
result.stdout.fnmatch_lines(
[
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,028 | copy_example | ref | function | p = pytester.copy_example("collect/collect_init_tests")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,029 | runpytest | ref | function | result = pytester.runpytest(p, "--collect-only")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,030 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,040 | runpytest | ref | function | result = pytester.runpytest("./tests", "--collect-only")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,041 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,052 | runpytest | ref | function | result = pytester.runpytest("./tests", ".", "--collect-only")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,053 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,064 | runpytest | ref | function | result = pytester.runpytest(".", "tests", "--collect-only")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,065 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,075 | runpytest | ref | function | result = pytester.runpytest("./tests/test_foo.py", "--collect-only")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,076 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,079 | no_fnmatch_line | ref | function | result.stdout.no_fnmatch_line("*test_init*")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,080 | runpytest | ref | function | result = pytester.runpytest("./tests/__init__.py", "--collect-only")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,081 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,084 | no_fnmatch_line | ref | function | result.stdout.no_fnmatch_line("*test_foo*")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,087 | test_collect_invalid_signature_message | def | function | def test_collect_invalid_signature_message(pytester: Pytester) -> None:
"""Check that we issue a proper message when we can't determine the signature of a test
function (#4026).
"""
pytester.makepyfile(
"""
import pytest
class TestCase:
@pytest.fixture
de... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,091 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,101 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,102 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,107 | test_collect_handles_raising_on_dunder_class | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,111 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,129 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,130 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*1 passed in*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,134 | test_collect_with_chdir_during_import | def | function | def test_collect_with_chdir_during_import(pytester: Pytester) -> None:
subdir = pytester.mkdir("sub")
pytester.path.joinpath("conftest.py").write_text(
textwrap.dedent(
"""
import os
os.chdir(%r)
"""
% (str(subdir),)
)
)
pyteste... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,145 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,154 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,155 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*1 passed in*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,159 | makeini | ref | function | pytester.makeini(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,166 | runpytest | ref | function | result = pytester.runpytest("--collect-only")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,167 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["collected 1 item"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,170 | test_collect_pyargs_with_testpaths | def | function | def test_collect_pyargs_with_testpaths(
pytester: Pytester, monkeypatch: MonkeyPatch
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,188 | setenv | ref | function | monkeypatch.setenv("PYTHONPATH", str(pytester.path), prepend=os.pathsep)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,190 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,191 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*1 passed in*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,194 | test_collect_symlink_file_arg | def | function | def test_collect_symlink_file_arg(pytester: Pytester) -> None:
"""Collect a direct symlink works even if it does not match python_files (#4325)."""
real = pytester.makepyfile(
real="""
def test_nodeid(request):
assert request.node.nodeid == "symlink.py::test_nodeid"
"""
)... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,196 | makepyfile | ref | function | real = pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,203 | symlink_or_skip | ref | function | symlink_or_skip(real, symlink)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,204 | runpytest | ref | function | result = pytester.runpytest("-v", symlink)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,205 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["symlink.py::test_nodeid PASSED*", "*1 passed in*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,209 | test_collect_symlink_out_of_tree | def | function | def test_collect_symlink_out_of_tree(pytester: Pytester) -> None:
"""Test collection of symlink via out-of-tree rootdir."""
sub = pytester.mkdir("sub")
real = sub.joinpath("test_real.py")
real.write_text(
textwrap.dedent(
"""
def test_nodeid(request):
# Should not... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,225 | symlink_or_skip | ref | function | symlink_or_skip(sub, symlink_to_sub)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,227 | runpytest | ref | function | result = pytester.runpytest("-vs", "--rootdir=%s" % sub, symlink_to_sub)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,228 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,237 | test_collect_symlink_dir | def | function | def test_collect_symlink_dir(pytester: Pytester) -> None:
"""A symlinked directory is collected."""
dir = pytester.mkdir("dir")
dir.joinpath("test_it.py").write_text("def test_it(): pass", "utf-8")
symlink_or_skip(pytester.path.joinpath("symlink_dir"), dir)
result = pytester.runpytest()
result.a... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,241 | symlink_or_skip | ref | function | symlink_or_skip(pytester.path.joinpath("symlink_dir"), dir)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,242 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,243 | assert_outcomes | ref | function | result.assert_outcomes(passed=2)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,246 | test_collectignore_via_conftest | def | function | def test_collectignore_via_conftest(pytester: Pytester) -> None:
"""collect_ignore in parent conftest skips importing child (issue #4592)."""
tests = pytester.mkpydir("tests")
tests.joinpath("conftest.py").write_text("collect_ignore = ['ignore_me']")
ignore_me = tests.joinpath("ignore_me")
ignore_m... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,248 | mkpydir | ref | function | tests = pytester.mkpydir("tests")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py | testing/test_collection.py | 1,256 | runpytest | ref | function | result = pytester.runpytest()
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.