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_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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_monkeypatch.py
testing/test_monkeypatch.py
436
syspath_prepend
ref
function
monkeypatch.syspath_prepend("hello")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_monkeypatch.py
testing/test_monkeypatch.py
439
check
ref
function
assert ns_pkg.hello.check() == "hello"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_monkeypatch.py
testing/test_monkeypatch.py
441
raises
ref
function
with pytest.raises(ImportError):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_monkeypatch.py
testing/test_monkeypatch.py
445
syspath_prepend
ref
function
monkeypatch.syspath_prepend("world")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_monkeypatch.py
testing/test_monkeypatch.py
448
check
ref
function
assert ns_pkg.world.check() == "world"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_monkeypatch.py
testing/test_monkeypatch.py
452
syspath_prepend
ref
function
monkeypatch.syspath_prepend(str(modules_tmpdir))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
13
parametrize
ref
function
@pytest.mark.parametrize(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
31
test_iterparentnodeids
def
function
def test_iterparentnodeids(nodeid: str, expected: List[str]) -> None: result = list(nodes.iterparentnodeids(nodeid)) assert result == expected
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
32
iterparentnodeids
ref
function
result = list(nodes.iterparentnodeids(nodeid))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
36
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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
37
raises
ref
function
with pytest.raises(TypeError, match="session is"):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
38
from_parent
ref
function
nodes.Node.from_parent(None, session=None) # type: ignore[arg-type]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
39
raises
ref
function
with pytest.raises(TypeError, match="config is"):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
40
from_parent
ref
function
nodes.Node.from_parent(None, config=None) # type: ignore[arg-type]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
43
test_node_direct_construction_deprecated
def
function
def test_node_direct_construction_deprecated() -> None: with pytest.raises( OutcomeException, match=( "Direct construction of _pytest.nodes.Node has been deprecated, please " "use _pytest.nodes.Node.from_parent.\nSee " "https://docs.pytest.org/en/stable/deprecatio...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
44
raises
ref
function
with pytest.raises(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
53
Node
ref
function
nodes.Node(None, session=None) # type: ignore[arg-type]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
56
test_subclassing_both_item_and_collector_deprecated
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
65
warns
ref
function
with pytest.warns(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
73
SoWrong
def
class
__init__
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
78
warns
ref
function
with pytest.warns(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
81
from_parent
ref
function
SoWrong.from_parent(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
82
legacy_path
ref
function
request.session, fspath=legacy_path(tmp_path / "broken.txt")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
86
parametrize
ref
function
@pytest.mark.parametrize(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
89
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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
92
getitems
ref
function
items = pytester.getitems(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
98
warns
ref
function
with pytest.warns(warn_type, match=msg):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
99
warn
ref
function
items[0].warn(warn_type(msg))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
99
warn_type
ref
function
items[0].warn(warn_type(msg))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
102
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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
103
getitems
ref
function
items = pytester.getitems(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
109
raises
ref
function
with pytest.raises(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
112
warn
ref
function
items[0].warn(Exception("ok")) # type: ignore[arg-type]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
115
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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
119
FakeSession1
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
124
_check_initialpaths_for_relpath
ref
function
assert nodes._check_initialpaths_for_relpath(session, cwd) == ""
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
128
FakeSession2
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
133
_check_initialpaths_for_relpath
ref
function
assert nodes._check_initialpaths_for_relpath(session, sub) == "file"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
136
_check_initialpaths_for_relpath
ref
function
assert nodes._check_initialpaths_for_relpath(session, outside) is None
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
139
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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
144
makepyfile
ref
function
p = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
162
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nodes.py
testing/test_nodes.py
163
fnmatch_lines
ref
function
result.stdout.fnmatch_lines([str(p) + ":*: AssertionError", "*1 failed in *"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
4
setup_module
def
function
def setup_module(mod): mod.nose = pytest.importorskip("nose")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
5
importorskip
ref
function
mod.nose = pytest.importorskip("nose")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
9
makepyfile
ref
function
p = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
25
runpytest
ref
function
result = pytester.runpytest(p, "-p", "nose")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
26
assert_outcomes
ref
function
result.assert_outcomes(passed=2)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
34
A
def
class
f
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
35
fixture
ref
function
@pytest.fixture(autouse=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
39
call_optional
ref
function
call_optional(A(), "f")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
39
A
ref
function
call_optional(A(), "f")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
46
A
def
class
f
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
49
call_optional
ref
function
call_optional(A(), "f")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
49
A
ref
function
call_optional(A(), "f")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
52
test_nose_setup_func
def
function
def test_nose_setup_func(pytester: Pytester) -> None: p = pytester.makepyfile( """ from nose.tools import with_setup values = [] def my_setup(): a = 1 values.append(a) def my_teardown(): b = 2 values.append(b) @with_...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
53
makepyfile
ref
function
p = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
78
runpytest
ref
function
result = pytester.runpytest(p, "-p", "nose")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
79
assert_outcomes
ref
function
result.assert_outcomes(passed=2)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
82
test_nose_setup_func_failure
def
function
def test_nose_setup_func_failure(pytester: Pytester) -> None: p = pytester.makepyfile( """ from nose.tools import with_setup values = [] my_setup = lambda x: 1 my_teardown = lambda x: 2 @with_setup(my_setup, my_teardown) def test_hello(): print(v...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
83
makepyfile
ref
function
p = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
102
runpytest
ref
function
result = pytester.runpytest(p, "-p", "nose")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
103
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*TypeError: <lambda>()*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
106
test_nose_setup_func_failure_2
def
function
def test_nose_setup_func_failure_2(pytester: Pytester) -> None: pytester.makepyfile( """ values = [] my_setup = 1 my_teardown = 2 def test_hello(): assert values == [] test_hello.setup = my_setup test_hello.teardown = my_teardown """ ) ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
107
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
121
inline_run
ref
function
reprec = pytester.inline_run()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
122
assertoutcome
ref
function
reprec.assertoutcome(passed=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
125
test_nose_setup_partial
def
function
def test_nose_setup_partial(pytester: Pytester) -> None: pytest.importorskip("functools") p = pytester.makepyfile( """ from functools import partial values = [] def my_setup(x): a = x values.append(a) def my_teardown(x): b = x ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
126
importorskip
ref
function
pytest.importorskip("functools")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
127
makepyfile
ref
function
p = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
156
runpytest
ref
function
result = pytester.runpytest(p, "-p", "nose")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
157
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*2 passed*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
160
test_module_level_setup
def
function
def test_module_level_setup(pytester: Pytester) -> None: pytester.makepyfile( """ from nose.tools import with_setup items = {} def setup(): items.setdefault("setup", []).append("up") def teardown(): items.setdefault("setup", []).append("down") ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
161
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
195
runpytest
ref
function
result = pytester.runpytest("-p", "nose")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
196
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*4 passed*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
199
test_nose_style_setup_teardown
def
function
def test_nose_style_setup_teardown(pytester: Pytester) -> None: pytester.makepyfile( """ values = [] def setup_module(): values.append(1) def teardown_module(): del values[0] def test_hello(): assert values == [1] def test_world...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
200
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
217
runpytest
ref
function
result = pytester.runpytest("-p", "nose")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
218
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*2 passed*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
221
test_fixtures_nose_setup_issue8394
def
function
def test_fixtures_nose_setup_issue8394(pytester: Pytester) -> None: pytester.makepyfile( """ def setup_module(): pass def teardown_module(): pass def setup_function(func): pass def teardown_function(func): pass def t...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
222
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
256
runpytest
ref
function
result = pytester.runpytest("--fixtures")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
258
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line(match)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
260
runpytest
ref
function
result = pytester.runpytest("--fixtures", "-v")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
262
fnmatch_lines
ref
function
result.stdout.fnmatch_lines([match, match, match, match])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
265
test_nose_setup_ordering
def
function
def test_nose_setup_ordering(pytester: Pytester) -> None: pytester.makepyfile( """ def setup_module(mod): mod.visited = _True class TestClass(object): def setup(self): assert visited self.visited_cls = _True def test_first(...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
266
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
280
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
281
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*1 passed*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
284
test_apiwrapper_problem_issue260
def
function
def test_apiwrapper_problem_issue260(pytester: Pytester) -> None: # this would end up trying a call an optional teardown on the class # for plain unittests we don't want nose behaviour pytester.makepyfile( """ import unittest class TestCase(unittest.TestCase): def setup(s...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
287
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
305
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
306
assert_outcomes
ref
function
result.assert_outcomes(passed=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
309
test_setup_teardown_linking_issue265
def
function
def test_setup_teardown_linking_issue265(pytester: Pytester) -> None: # we accidentally didn't integrate nose setupstate with normal setupstate # this test ensures that won't happen again pytester.makepyfile( ''' import pytest class TestGeneric(object): def test_nothing(...