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_monkeypatch.py | testing/test_monkeypatch.py | 253 | undo | ref | function | mp.undo()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 257 | test_syspath_prepend_double_undo | def | function | def test_syspath_prepend_double_undo(mp: MonkeyPatch) -> None:
old_syspath = sys.path[:]
try:
mp.syspath_prepend("hello world")
mp.undo()
sys.path.append("more hello world")
mp.undo()
assert sys.path[-1] == "more hello world"
finally:
sys.path[:] = old_syspath... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 260 | syspath_prepend | ref | function | mp.syspath_prepend("hello world")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 261 | undo | ref | function | mp.undo()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 263 | undo | ref | function | mp.undo()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 269 | test_chdir_with_path_local | def | function | def test_chdir_with_path_local(mp: MonkeyPatch, tmp_path: Path) -> None:
mp.chdir(tmp_path)
assert os.getcwd() == str(tmp_path)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 274 | test_chdir_with_str | def | function | def test_chdir_with_str(mp: MonkeyPatch, tmp_path: Path) -> None:
mp.chdir(str(tmp_path))
assert os.getcwd() == str(tmp_path)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 279 | test_chdir_undo | def | function | def test_chdir_undo(mp: MonkeyPatch, tmp_path: Path) -> None:
cwd = os.getcwd()
mp.chdir(tmp_path)
mp.undo()
assert os.getcwd() == cwd
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 282 | undo | ref | function | mp.undo()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 286 | test_chdir_double_undo | def | function | def test_chdir_double_undo(mp: MonkeyPatch, tmp_path: Path) -> None:
mp.chdir(str(tmp_path))
mp.undo()
os.chdir(tmp_path)
mp.undo()
assert os.getcwd() == str(tmp_path)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 288 | undo | ref | function | mp.undo()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 290 | undo | ref | function | mp.undo()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 294 | test_issue185_time_breaks | def | function | def test_issue185_time_breaks(pytester: Pytester) -> None:
pytester.makepyfile(
"""
import time
def test_m(monkeypatch):
def f():
raise Exception
monkeypatch.setattr(time, "time", f)
"""
)
result = pytester.runpytest()
result.stdout.fnm... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 295 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 304 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 305 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 312 | test_importerror | def | function | def test_importerror(pytester: Pytester) -> None:
p = pytester.mkpydir("package")
p.joinpath("a.py").write_text(
textwrap.dedent(
"""\
import doesnotexist
x = 1
"""
)
)
pytester.path.joinpath("test_importerror.py").write_text(
textwrap.dedent(
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 313 | mkpydir | ref | function | p = pytester.mkpydir("package")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 331 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 332 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 339 | Sample | def | class | hello |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 341 | hello | def | function | def hello() -> bool:
return _True
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 345 | SampleInherit | def | class | |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 349 | parametrize | ref | function | @pytest.mark.parametrize(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 354 | test_issue156_undo_staticmethod | def | function | def test_issue156_undo_staticmethod(Sample: Type[Sample]) -> None:
monkeypatch = MonkeyPatch()
monkeypatch.setattr(Sample, "hello", None)
assert Sample.hello is None
monkeypatch.undo() # type: ignore[unreachable]
assert Sample.hello()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 355 | MonkeyPatch | ref | function | monkeypatch = MonkeyPatch()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 360 | undo | ref | function | monkeypatch.undo() # type: ignore[unreachable]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 361 | hello | ref | function | assert Sample.hello()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 364 | test_undo_class_descriptors_delattr | def | class | |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 365 | SampleParent | def | class | hello world |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 367 | hello | def | function | def hello(_cls):
pass
@staticmethod
def world():
pass
class SampleChild(SampleParent):
pass
monkeypatch = MonkeyPatch()
original_hello = SampleChild.hello
original_world = SampleChild.world
monkeypatch.delattr(SampleParent, "hello")
mon... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 371 | world | def | function | def world():
pass
class SampleChild(SampleParent):
pass
monkeypatch = MonkeyPatch()
original_hello = SampleChild.hello
original_world = SampleChild.world
monkeypatch.delattr(SampleParent, "hello")
monkeypatch.delattr(SampleParent, "world")
assert getattr(Sample... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 374 | SampleChild | def | class | |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 377 | MonkeyPatch | ref | function | monkeypatch = MonkeyPatch()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 386 | undo | ref | function | monkeypatch.undo()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 391 | test_issue1338_name_resolving | def | function | def test_issue1338_name_resolving() -> None:
pytest.importorskip("requests")
monkeypatch = MonkeyPatch()
try:
monkeypatch.delattr("requests.sessions.Session.request")
finally:
monkeypatch.undo()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 392 | importorskip | ref | function | pytest.importorskip("requests")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 393 | MonkeyPatch | ref | function | monkeypatch = MonkeyPatch()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 397 | undo | ref | function | monkeypatch.undo()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 400 | test_context | def | function | def test_context() -> None:
monkeypatch = MonkeyPatch()
import functools
import inspect
with monkeypatch.context() as m:
m.setattr(functools, "partial", 3)
assert not inspect.isclass(functools.partial)
assert inspect.isclass(functools.partial)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 401 | MonkeyPatch | ref | function | monkeypatch = MonkeyPatch()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 406 | context | ref | function | with monkeypatch.context() as m:
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 412 | test_context_classmethod | def | class | |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 413 | A | def | class | |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 416 | context | ref | function | with MonkeyPatch.context() as m:
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 422 | test_syspath_prepend_with_namespace_packages | def | function | def test_syspath_prepend_with_namespace_packages(
pytester: Pytester, monkeypatch: MonkeyPatch
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 436 | syspath_prepend | ref | function | monkeypatch.syspath_prepend("hello")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 439 | check | ref | function | assert ns_pkg.hello.check() == "hello"
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 441 | raises | ref | function | with pytest.raises(ImportError):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 445 | syspath_prepend | ref | function | monkeypatch.syspath_prepend("world")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 448 | check | ref | function | assert ns_pkg.world.check() == "world"
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_monkeypatch.py | testing/test_monkeypatch.py | 452 | syspath_prepend | ref | function | monkeypatch.syspath_prepend(str(modules_tmpdir))
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 12 | parametrize | ref | function | @pytest.mark.parametrize(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 30 | test_iterparentnodeids | def | function | def test_iterparentnodeids(nodeid: str, expected: List[str]) -> None:
result = list(nodes.iterparentnodeids(nodeid))
assert result == expected
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 31 | iterparentnodeids | ref | function | result = list(nodes.iterparentnodeids(nodeid))
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 35 | test_node_from_parent_disallowed_arguments | def | function | def test_node_from_parent_disallowed_arguments() -> None:
with pytest.raises(TypeError, match="session is"):
nodes.Node.from_parent(None, session=None) # type: ignore[arg-type]
with pytest.raises(TypeError, match="config is"):
nodes.Node.from_parent(None, config=None) # type: ignore[arg-type]
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 36 | raises | ref | function | with pytest.raises(TypeError, match="session is"):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 37 | from_parent | ref | function | nodes.Node.from_parent(None, session=None) # type: ignore[arg-type]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 38 | raises | ref | function | with pytest.raises(TypeError, match="config is"):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 39 | from_parent | ref | function | nodes.Node.from_parent(None, config=None) # type: ignore[arg-type]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 42 | test_subclassing_both_item_and_collector_deprecated | def | class | |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 51 | warns | ref | function | with pytest.warns(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 59 | SoWrong | def | class | __init__ |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 64 | warns | ref | function | with pytest.warns(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 67 | from_parent | ref | function | SoWrong.from_parent(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 68 | legacy_path | ref | function | request.session, fspath=legacy_path(tmp_path / "broken.txt")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 72 | parametrize | ref | function | @pytest.mark.parametrize(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 75 | test_node_warn_is_no_longer_only_pytest_warnings | def | function | def test_node_warn_is_no_longer_only_pytest_warnings(
pytester: Pytester, warn_type: Type[Warning], msg: str
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 78 | getitems | ref | function | items = pytester.getitems(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 84 | warns | ref | function | with pytest.warns(warn_type, match=msg):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 85 | warn | ref | function | items[0].warn(warn_type(msg))
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 85 | warn_type | ref | function | items[0].warn(warn_type(msg))
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 88 | test_node_warning_enforces_warning_types | def | function | def test_node_warning_enforces_warning_types(pytester: Pytester) -> None:
items = pytester.getitems(
"""
def test():
pass
"""
)
with pytest.raises(
ValueError, match="warning must be an instance of Warning or subclass"
):
items[0].warn(Exception("ok")) # ... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 89 | getitems | ref | function | items = pytester.getitems(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 95 | raises | ref | function | with pytest.raises(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 98 | warn | ref | function | items[0].warn(Exception("ok")) # type: ignore[arg-type]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 101 | test__check_initialpaths_for_relpath | def | function | def test__check_initialpaths_for_relpath() -> None:
"""Ensure that it handles dirs, and does not always use dirname."""
cwd = Path.cwd()
class FakeSession1:
_initialpaths = frozenset({cwd})
session = cast(pytest.Session, FakeSession1)
assert nodes._check_initialpaths_for_relpath(session, ... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 105 | FakeSession1 | def | class | |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 110 | _check_initialpaths_for_relpath | ref | function | assert nodes._check_initialpaths_for_relpath(session, cwd) == ""
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 114 | FakeSession2 | def | class | |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 119 | _check_initialpaths_for_relpath | ref | function | assert nodes._check_initialpaths_for_relpath(session, sub) == "file"
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 122 | _check_initialpaths_for_relpath | ref | function | assert nodes._check_initialpaths_for_relpath(session, outside) is None
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 125 | test_failure_with_changed_cwd | def | function | def test_failure_with_changed_cwd(pytester: Pytester) -> None:
"""
Test failure lines should use absolute paths if cwd has changed since
invocation, so the path is correct (#6428).
"""
p = pytester.makepyfile(
"""
import os
import pytest
@pytest.fixture
def p... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 130 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 148 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nodes.py | testing/test_nodes.py | 149 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines([str(p) + ":*: AssertionError", "*1 failed in *"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nose.py | testing/test_nose.py | 4 | setup_module | def | function | def setup_module(mod):
mod.nose = pytest.importorskip("nose")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nose.py | testing/test_nose.py | 5 | importorskip | ref | function | mod.nose = pytest.importorskip("nose")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nose.py | testing/test_nose.py | 8 | test_nose_setup | def | function | def test_nose_setup(pytester: Pytester) -> None:
p = pytester.makepyfile(
"""
values = []
from nose.tools import with_setup
@with_setup(lambda: values.append(1), lambda: values.append(2))
def test_hello():
assert values == [1]
def test_world():
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nose.py | testing/test_nose.py | 9 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nose.py | testing/test_nose.py | 25 | runpytest | ref | function | result = pytester.runpytest(p, "-p", "nose")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nose.py | testing/test_nose.py | 26 | assert_outcomes | ref | function | result.assert_outcomes(passed=2)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nose.py | testing/test_nose.py | 29 | test_setup_func_with_setup_decorator | def | function | def test_setup_func_with_setup_decorator() -> None:
from _pytest.nose import call_optional
values = []
class A:
@pytest.fixture(autouse=_True)
def f(self):
values.append(1)
call_optional(A(), "f")
assert not values
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nose.py | testing/test_nose.py | 34 | A | def | class | f |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nose.py | testing/test_nose.py | 35 | fixture | ref | function | @pytest.fixture(autouse=True)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nose.py | testing/test_nose.py | 36 | f | def | function | def f(self):
values.append(1)
call_optional(A(), "f")
assert not values
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nose.py | testing/test_nose.py | 39 | call_optional | ref | function | call_optional(A(), "f")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nose.py | testing/test_nose.py | 39 | A | ref | function | call_optional(A(), "f")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nose.py | testing/test_nose.py | 43 | test_setup_func_not_callable | def | function | def test_setup_func_not_callable() -> None:
from _pytest.nose import call_optional
class A:
f = 1
call_optional(A(), "f")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_nose.py | testing/test_nose.py | 46 | A | def | class | f |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.