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
1,260
test_collect_pkg_init_and_file_in_args
def
function
def test_collect_pkg_init_and_file_in_args(pytester: Pytester) -> None: subdir = pytester.mkdir("sub") init = subdir.joinpath("__init__.py") init.write_text("def test_init(): pass") p = subdir.joinpath("test_file.py") p.write_text("def test_file(): pass") # NOTE: without "-o python_files=*.py" ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,270
runpytest
ref
function
result = pytester.runpytest("-v", str(init), str(p))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,271
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,279
runpytest
ref
function
result = pytester.runpytest("-v", "-o", "python_files=*.py", str(init), str(p))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,280
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,289
test_collect_pkg_init_only
def
function
def test_collect_pkg_init_only(pytester: Pytester) -> None: subdir = pytester.mkdir("sub") init = subdir.joinpath("__init__.py") init.write_text("def test_init(): pass") result = pytester.runpytest(str(init)) result.stdout.fnmatch_lines(["*no tests ran in*"]) result = pytester.runpytest("-v", ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,294
runpytest
ref
function
result = pytester.runpytest(str(init))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,295
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*no tests ran in*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,297
runpytest
ref
function
result = pytester.runpytest("-v", "-o", "python_files=*.py", str(init))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,298
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["sub/__init__.py::test_init PASSED*", "*1 passed in*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,301
parametrize
ref
function
@pytest.mark.parametrize("use_pkg", (True, False))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,302
test_collect_sub_with_symlinks
def
function
def test_collect_sub_with_symlinks(use_pkg: bool, pytester: Pytester) -> None: """Collection works with symlinked files and broken symlinks""" sub = pytester.mkdir("sub") if use_pkg: sub.joinpath("__init__.py").touch() sub.joinpath("test_file.py").write_text("def test_file(): pass") # Creat...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,310
symlink_or_skip
ref
function
symlink_or_skip("test_doesnotexist.py", sub.joinpath("test_broken.py"))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,313
symlink_or_skip
ref
function
symlink_or_skip("test_file.py", sub.joinpath("test_symlink.py"))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,315
runpytest
ref
function
result = pytester.runpytest("-v", str(sub))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,316
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,325
test_collector_respects_tbstyle
def
function
def test_collector_respects_tbstyle(pytester: Pytester) -> None: p1 = pytester.makepyfile("assert 0") result = pytester.runpytest(p1, "--tb=native") assert result.ret == ExitCode.INTERRUPTED result.stdout.fnmatch_lines( [ "*_ ERROR collecting test_collector_respects_tbstyle.py _*", ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,326
makepyfile
ref
function
p1 = pytester.makepyfile("assert 0")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,327
runpytest
ref
function
result = pytester.runpytest(p1, "--tb=native")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,329
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,342
test_does_not_eagerly_collect_packages
def
function
def test_does_not_eagerly_collect_packages(pytester: Pytester) -> None: pytester.makepyfile("def test(): pass") pydir = pytester.mkpydir("foopkg") pydir.joinpath("__init__.py").write_text("assert _False") result = pytester.runpytest() assert result.ret == ExitCode.OK
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,343
makepyfile
ref
function
pytester.makepyfile("def test(): pass")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,344
mkpydir
ref
function
pydir = pytester.mkpydir("foopkg")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,346
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,350
test_does_not_put_src_on_path
def
function
def test_does_not_put_src_on_path(pytester: Pytester) -> None: # `src` is not on sys.path so it should not be importable ensure_file(pytester.path / "src/nope/__init__.py") pytester.makepyfile( "import pytest\n" "def test():\n" " with pytest.raises(ImportError):\n" " ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,352
ensure_file
ref
function
ensure_file(pytester.path / "src/nope/__init__.py")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,353
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,359
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,363
test_fscollector_from_parent
def
function
def test_fscollector_from_parent(pytester: Pytester, request: FixtureRequest) -> None: """Ensure File.from_parent can forward custom arguments to the constructor. Context: https://github.com/pytest-dev/pytest-cpp/pull/47 """ class MyCollector(pytest.File): def __init__(self, *k, x, **kw): ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,369
MyCollector
def
class
__init__ __init__ from_parent
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,374
from_parent
ref
function
collector = MyCollector.from_parent(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,380
test_class_from_parent
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,383
MyCollector
def
class
__init__ __init__ from_parent
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,389
from_parent
def
function
def from_parent(cls, parent, *, name, x): return super().from_parent(parent=parent, name=name, x=x) collector = MyCollector.from_parent(parent=request.session, name="foo", x=10) assert collector.x == 10
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,390
from_parent
ref
function
return super().from_parent(parent=parent, name=name, x=x)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,392
from_parent
ref
function
collector = MyCollector.from_parent(parent=request.session, name="foo", x=10)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,396
TestImportModeImportlib
def
class
test_collect_duplicate_names test_conftest setup_conftest_and_foo test_modules_importable_as_side_effect test_modules_not_importable_as_side_effect
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,397
test_collect_duplicate_names
def
function
def test_collect_duplicate_names(self, pytester: Pytester) -> None: """--import-mode=importlib can import modules with same names that are not in packages.""" pytester.makepyfile( **{ "tests_a/test_foo.py": "def test_foo1(): pass", "tests_b/test_foo.py": "...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,399
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,405
runpytest
ref
function
result = pytester.runpytest("-v", "--import-mode=importlib")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,406
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,414
test_conftest
def
function
def test_conftest(self, pytester: Pytester) -> None: """Directory containing conftest modules are not put in sys.path as a side-effect of importing them.""" tests_dir = pytester.path.joinpath("tests") pytester.makepyfile( **{ "tests/conftest.py": "", ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,418
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,430
runpytest
ref
function
result = pytester.runpytest("-v", "--import-mode=importlib")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,431
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,433
setup_conftest_and_foo
def
function
def setup_conftest_and_foo(self, pytester: Pytester) -> None: """Setup a tests folder to be used to test if modules in that folder can be imported due to side-effects of --import-mode or not.""" pytester.makepyfile( **{ "tests/conftest.py": "", "te...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,436
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,450
test_modules_importable_as_side_effect
def
function
def test_modules_importable_as_side_effect(self, pytester: Pytester) -> None: """In import-modes `prepend` and `append`, we are able to import modules from folders containing conftest.py files due to the side effect of changing sys.path.""" self.setup_conftest_and_foo(pytester) resul...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,453
setup_conftest_and_foo
ref
function
self.setup_conftest_and_foo(pytester)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,454
runpytest
ref
function
result = pytester.runpytest("-v", "--import-mode=prepend")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,455
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,457
test_modules_not_importable_as_side_effect
def
function
def test_modules_not_importable_as_side_effect(self, pytester: Pytester) -> None: """In import-mode `importlib`, modules in folders containing conftest.py are not importable, as don't change sys.path or sys.modules as side effect of importing the conftest.py file. """ self.se...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,462
setup_conftest_and_foo
ref
function
self.setup_conftest_and_foo(pytester)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,463
runpytest
ref
function
result = pytester.runpytest("-v", "--import-mode=importlib")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,464
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,473
test_does_not_crash_on_error_from_decorated_function
def
function
def test_does_not_crash_on_error_from_decorated_function(pytester: Pytester) -> None: """Regression test for an issue around bad exception formatting due to assertion rewriting mangling lineno's (#4984).""" pytester.makepyfile( """ @pytest.fixture def a(): return 4 """ ) ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,476
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,482
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,487
test_does_not_crash_on_recursive_symlink
def
function
def test_does_not_crash_on_recursive_symlink(pytester: Pytester) -> None: """Regression test for an issue around recursive symlinks (#7951).""" symlink_or_skip("recursive", pytester.path.joinpath("recursive")) pytester.makepyfile( """ def test_foo(): assert _True """ ) result...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,489
symlink_or_skip
ref
function
symlink_or_skip("recursive", pytester.path.joinpath("recursive"))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,490
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,495
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
1,498
parseoutcomes
ref
function
assert result.parseoutcomes() == {"passed": 1}
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
21
test_is_generator
def
function
def test_is_generator() -> None: def zap(): yield # pragma: no cover def foo(): pass # pragma: no cover assert is_generator(zap) assert not is_generator(foo)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
22
zap
def
function
def zap(): yield # pragma: no cover def foo(): pass # pragma: no cover assert is_generator(zap) assert not is_generator(foo)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
25
foo
def
function
def foo(): pass # pragma: no cover assert is_generator(zap) assert not is_generator(foo)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
28
is_generator
ref
function
assert is_generator(zap)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
29
is_generator
ref
function
assert not is_generator(foo)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
32
test_real_func_loop_limit
def
function
def test_real_func_loop_limit() -> None: class Evil: def __init__(self): self.left = 1000 def __repr__(self): return f"<Evil left={self.left}>" def __getattr__(self, attr): if not self.left: raise RuntimeError("it's over") # pragma: no c...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
33
Evil
def
class
__init__ __repr__ __getattr__
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
40
__getattr__
def
function
def __getattr__(self, attr): if not self.left: raise RuntimeError("it's over") # pragma: no cover self.left -= 1 return self evil = Evil() with pytest.raises( ValueError, match=( "could not find real function of <Evil lef...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
46
Evil
ref
function
evil = Evil()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
48
raises
ref
function
with pytest.raises(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
55
get_real_func
ref
function
get_real_func(evil)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
58
test_get_real_func
def
function
def test_get_real_func() -> None: """Check that get_real_func correctly unwraps decorators until reaching the real function""" def decorator(f): @wraps(f) def inner(): pass # pragma: no cover return inner def func(): pass # pragma: no cover wrapped_func ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
61
decorator
def
function
def decorator(f): @wraps(f) def inner(): pass # pragma: no cover return inner def func(): pass # pragma: no cover wrapped_func = decorator(decorator(func)) assert get_real_func(wrapped_func) is func wrapped_func2 = decorator(decorator(wrapped_func)) ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
63
inner
def
function
def inner(): pass # pragma: no cover return inner def func(): pass # pragma: no cover wrapped_func = decorator(decorator(func)) assert get_real_func(wrapped_func) is func wrapped_func2 = decorator(decorator(wrapped_func)) assert get_real_func(wrapped_func2) ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
68
func
def
function
def func(): pass # pragma: no cover wrapped_func = decorator(decorator(func)) assert get_real_func(wrapped_func) is func wrapped_func2 = decorator(decorator(wrapped_func)) assert get_real_func(wrapped_func2) is func # special case for __pytest_wrapped__ attribute: used to obtain the ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
71
decorator
ref
function
wrapped_func = decorator(decorator(func))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
71
decorator
ref
function
wrapped_func = decorator(decorator(func))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
72
get_real_func
ref
function
assert get_real_func(wrapped_func) is func
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
74
decorator
ref
function
wrapped_func2 = decorator(decorator(wrapped_func))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
74
decorator
ref
function
wrapped_func2 = decorator(decorator(wrapped_func))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
75
get_real_func
ref
function
assert get_real_func(wrapped_func2) is func
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
79
_PytestWrapper
ref
function
wrapped_func2.__pytest_wrapped__ = _PytestWrapper(wrapped_func)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
80
get_real_func
ref
function
assert get_real_func(wrapped_func2) is wrapped_func
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
83
test_get_real_func_partial
def
function
def test_get_real_func_partial() -> None: """Test get_real_func handles partial instances correctly""" def foo(x): return x assert get_real_func(foo) is foo assert get_real_func(partial(foo)) is foo
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
86
foo
def
function
def foo(x): return x assert get_real_func(foo) is foo assert get_real_func(partial(foo)) is foo
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
89
get_real_func
ref
function
assert get_real_func(foo) is foo
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
90
get_real_func
ref
function
assert get_real_func(partial(foo)) is foo
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
93
test_is_generator_asyncio
def
function
def test_is_generator_asyncio(pytester: Pytester) -> None: pytester.makepyfile( """ from _pytest.compat import is_generator import asyncio @asyncio.coroutine def baz(): yield from [1,2,3] def test_is_generator_asyncio(): assert not is_generato...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
94
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
108
runpytest_subprocess
ref
function
result = pytester.runpytest_subprocess()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
109
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*1 passed*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
112
test_is_generator_async_syntax
def
function
def test_is_generator_async_syntax(pytester: Pytester) -> None: pytester.makepyfile( """ from _pytest.compat import is_generator def test_is_generator_py35(): async def foo(): await foo() async def bar(): pass assert not i...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
113
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
127
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
128
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*1 passed*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
131
test_is_generator_async_gen_syntax
def
function
def test_is_generator_async_gen_syntax(pytester: Pytester) -> None: pytester.makepyfile( """ from _pytest.compat import is_generator def test_is_generator_py36(): async def foo(): yield await foo() async def bar(): yiel...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_compat.py
testing/test_compat.py
132
makepyfile
ref
function
pytester.makepyfile(