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/python/raises.py | testing/python/raises.py | 133 | test_invalid_arguments_to_raises | def | function | def test_invalid_arguments_to_raises(self) -> None:
with pytest.raises(TypeError, match="unknown"):
with pytest.raises(TypeError, unknown="bogus"): # type: ignore[call-overload]
raise ValueError()
def test_tuple(self):
with pytest.raises((KeyError, ValueError)):
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 134 | raises | ref | function | with pytest.raises(TypeError, match="unknown"):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 135 | raises | ref | function | with pytest.raises(TypeError, unknown="bogus"): # type: ignore[call-overload]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 138 | test_tuple | def | function | def test_tuple(self):
with pytest.raises((KeyError, ValueError)):
raise KeyError("oops")
def test_no_raise_message(self) -> None:
try:
pytest.raises(ValueError, int, "0")
except pytest.fail.Exception as e:
assert e.msg == f"DID NOT RAISE {repr(ValueEr... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 139 | raises | ref | function | with pytest.raises((KeyError, ValueError)):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 142 | test_no_raise_message | def | function | def test_no_raise_message(self) -> None:
try:
pytest.raises(ValueError, int, "0")
except pytest.fail.Exception as e:
assert e.msg == f"DID NOT RAISE {repr(ValueError)}"
else:
assert _False, "Expected pytest.raises.Exception"
try:
with ... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 144 | raises | ref | function | pytest.raises(ValueError, int, "0")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 151 | raises | ref | function | with pytest.raises(ValueError):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 158 | parametrize | ref | function | @pytest.mark.parametrize("method", ["function", "function_match", "with"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 159 | test_raises_cyclic_reference | def | function | def test_raises_cyclic_reference(self, method):
"""Ensure pytest.raises does not leave a reference cycle (#1965)."""
import gc
class T:
def __call__(self):
raise ValueError
t = T()
refcount = len(gc.get_referrers(t))
if method == "functi... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 163 | T | def | class | __call__ |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 164 | __call__ | def | function | def __call__(self):
pass
try:
pytest.raises(ValueError, A())
except pytest.fail.Exception:
pass
def test_raises_falsey_type_error(self) -> None:
with pytest.raises(TypeError):
with pytest.raises(AssertionError, match=0): # ty... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 167 | T | ref | function | t = T()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 171 | raises | ref | function | pytest.raises(ValueError, t)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 173 | raises | ref | function | pytest.raises(ValueError, t).match("^$")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 175 | raises | ref | function | with pytest.raises(ValueError):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 176 | t | ref | function | t()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 183 | test_raises_match | def | function | def test_raises_match(self) -> None:
msg = r"with base \d+"
with pytest.raises(ValueError, match=msg):
int("asdf")
msg = "with base 10"
with pytest.raises(ValueError, match=msg):
int("asdf")
msg = "with base 16"
expr = "Regex pattern {!r} doe... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 185 | raises | ref | function | with pytest.raises(ValueError, match=msg):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 189 | raises | ref | function | with pytest.raises(ValueError, match=msg):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 196 | raises | ref | function | with pytest.raises(AssertionError, match=re.escape(expr)):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 197 | raises | ref | function | with pytest.raises(ValueError, match=msg):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 201 | raises | ref | function | pytest.raises(ValueError, int, "asdf").match("invalid literal")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 202 | raises | ref | function | with pytest.raises(AssertionError) as excinfo:
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 203 | raises | ref | function | pytest.raises(ValueError, int, "asdf").match(msg)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 206 | raises | ref | function | pytest.raises(TypeError, int, match="invalid")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 208 | tfunc | def | function | def tfunc(match):
raise ValueError(f"match={match}")
pytest.raises(ValueError, tfunc, match="asdf").match("match=asdf")
pytest.raises(ValueError, tfunc, match="").match("match=")
def test_match_failure_string_quoting(self):
with pytest.raises(AssertionError) as excinfo:... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 211 | raises | ref | function | pytest.raises(ValueError, tfunc, match="asdf").match("match=asdf")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 212 | raises | ref | function | pytest.raises(ValueError, tfunc, match="").match("match=")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 214 | test_match_failure_string_quoting | def | function | def test_match_failure_string_quoting(self):
with pytest.raises(AssertionError) as excinfo:
with pytest.raises(AssertionError, match="'foo"):
raise AssertionError("'bar")
(msg,) = excinfo.value.args
assert msg == 'Regex pattern "\'foo" does not match "\'bar".'
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 215 | raises | ref | function | with pytest.raises(AssertionError) as excinfo:
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 216 | raises | ref | function | with pytest.raises(AssertionError, match="'foo"):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 221 | test_match_failure_exact_string_message | def | function | def test_match_failure_exact_string_message(self):
message = "Oh here is a message with (42) numbers in parameters"
with pytest.raises(AssertionError) as excinfo:
with pytest.raises(AssertionError, match=message):
raise AssertionError(message)
(msg,) = excinfo.val... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 223 | raises | ref | function | with pytest.raises(AssertionError) as excinfo:
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 224 | raises | ref | function | with pytest.raises(AssertionError, match=message):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 233 | test_raises_match_wrong_type | def | function | def test_raises_match_wrong_type(self):
"""Raising an exception with the wrong type and match= given.
pytest should throw the unexpected exception - the pattern match is not
really relevant if we got a different exception.
"""
with pytest.raises(ValueError):
with... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 239 | raises | ref | function | with pytest.raises(ValueError):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 240 | raises | ref | function | with pytest.raises(IndexError, match="nomatch"):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 243 | test_raises_exception_looks_iterable | def | function | def test_raises_exception_looks_iterable(self):
class Meta(type):
def __getitem__(self, item):
return 1 / 0
def __len__(self):
return 1
class ClassLooksIterableException(Exception, metaclass=Meta):
pass
with pytest.raises... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 244 | Meta | def | class | __getitem__ __len__ |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 251 | ClassLooksIterableException | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 254 | raises | ref | function | with pytest.raises(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 258 | raises | ref | function | pytest.raises(ClassLooksIterableException, lambda: None)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 260 | test_raises_with_raising_dunder_class | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 263 | CrappyClass | def | class | __class__ |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 269 | raises | ref | function | with pytest.raises(AssertionError) as excinfo:
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 270 | raises | ref | function | with pytest.raises(CrappyClass()): # type: ignore[call-overload]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 270 | CrappyClass | ref | function | with pytest.raises(CrappyClass()): # type: ignore[call-overload]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 274 | test_raises_context_manager_with_kwargs | def | function | def test_raises_context_manager_with_kwargs(self):
with pytest.raises(TypeError) as excinfo:
with pytest.raises(Exception, foo="bar"): # type: ignore[call-overload]
pass
assert "Unexpected keyword arguments" in str(excinfo.value)
def test_expected_exception_is_not_a... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 275 | raises | ref | function | with pytest.raises(TypeError) as excinfo:
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 276 | raises | ref | function | with pytest.raises(Exception, foo="bar"): # type: ignore[call-overload]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 280 | test_expected_exception_is_not_a_baseexception | def | function | def test_expected_exception_is_not_a_baseexception(self) -> None:
with pytest.raises(TypeError) as excinfo:
with pytest.raises("hello"): # type: ignore[call-overload]
pass # pragma: no cover
assert "must be a BaseException type, not str" in str(excinfo.value)
c... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 281 | raises | ref | function | with pytest.raises(TypeError) as excinfo:
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 282 | raises | ref | function | with pytest.raises("hello"): # type: ignore[call-overload]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 286 | NotAnException | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 289 | raises | ref | function | with pytest.raises(TypeError) as excinfo:
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 290 | raises | ref | function | with pytest.raises(NotAnException): # type: ignore[type-var]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 294 | raises | ref | function | with pytest.raises(TypeError) as excinfo:
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/raises.py | testing/python/raises.py | 295 | raises | ref | function | with pytest.raises(("hello", NotAnException)): # type: ignore[arg-type]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 3 | test_no_items_should_not_show_output | def | function | def test_no_items_should_not_show_output(pytester: Pytester) -> None:
result = pytester.runpytest("--fixtures-per-test")
result.stdout.no_fnmatch_line("*fixtures used by*")
assert result.ret == 0
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 4 | runpytest | ref | function | result = pytester.runpytest("--fixtures-per-test")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 5 | no_fnmatch_line | ref | function | result.stdout.no_fnmatch_line("*fixtures used by*")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 9 | test_fixtures_in_module | def | function | def test_fixtures_in_module(pytester: Pytester) -> None:
p = pytester.makepyfile(
'''
import pytest
@pytest.fixture
def _arg0():
"""hidden arg0 fixture"""
@pytest.fixture
def arg1():
"""arg1 docstring"""
def test_arg1(arg1):
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 10 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 24 | runpytest | ref | function | result = pytester.runpytest("--fixtures-per-test", p)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 27 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 35 | no_fnmatch_line | ref | function | result.stdout.no_fnmatch_line("*_arg0*")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 38 | test_fixtures_in_conftest | def | function | def test_fixtures_in_conftest(pytester: Pytester) -> None:
pytester.makeconftest(
'''
import pytest
@pytest.fixture
def arg1():
"""arg1 docstring"""
@pytest.fixture
def arg2():
"""arg2 docstring"""
@pytest.fixture
def arg3(arg1,... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 39 | makeconftest | ref | function | pytester.makeconftest(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 55 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 63 | runpytest | ref | function | result = pytester.runpytest("--fixtures-per-test", p)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 66 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 84 | test_should_show_fixtures_used_by_test | def | function | def test_should_show_fixtures_used_by_test(pytester: Pytester) -> None:
pytester.makeconftest(
'''
import pytest
@pytest.fixture
def arg1():
"""arg1 from conftest"""
@pytest.fixture
def arg2():
"""arg2 from conftest"""
'''
)
p = pyt... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 85 | makeconftest | ref | function | pytester.makeconftest(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 96 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 106 | runpytest | ref | function | result = pytester.runpytest("--fixtures-per-test", p)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 109 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 121 | test_verbose_include_private_fixtures_and_loc | def | function | def test_verbose_include_private_fixtures_and_loc(pytester: Pytester) -> None:
pytester.makeconftest(
'''
import pytest
@pytest.fixture
def _arg1():
"""_arg1 from conftest"""
@pytest.fixture
def arg2(_arg1):
"""arg2 from conftest"""
'''
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 122 | makeconftest | ref | function | pytester.makeconftest(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 133 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 143 | runpytest | ref | function | result = pytester.runpytest("--fixtures-per-test", "-v", p)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 146 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 160 | test_doctest_items | def | function | def test_doctest_items(pytester: Pytester) -> None:
pytester.makepyfile(
'''
def foo():
"""
>>> 1 + 1
2
"""
'''
)
pytester.maketxtfile(
"""
>>> 1 + 1
2
"""
)
result = pytester.runpytest(
"--fixtur... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 161 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 170 | maketxtfile | ref | function | pytester.maketxtfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 176 | runpytest | ref | function | result = pytester.runpytest(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 181 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*collected 2 items*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 184 | test_multiline_docstring_in_module | def | function | def test_multiline_docstring_in_module(pytester: Pytester) -> None:
p = pytester.makepyfile(
'''
import pytest
@pytest.fixture
def arg1():
"""Docstring content that spans across multiple lines,
through second line,
and through third line.
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 185 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 203 | runpytest | ref | function | result = pytester.runpytest("--fixtures-per-test", p)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 206 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 218 | test_verbose_include_multiline_docstring | def | function | def test_verbose_include_multiline_docstring(pytester: Pytester) -> None:
p = pytester.makepyfile(
'''
import pytest
@pytest.fixture
def arg1():
"""Docstring content that spans across multiple lines,
through second line,
and through third line.
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 219 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 237 | runpytest | ref | function | result = pytester.runpytest("--fixtures-per-test", "-v", p)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/show_fixtures_per_test.py | testing/python/show_fixtures_per_test.py | 240 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 10 | equal_with_bash | def | function | def equal_with_bash(prefix, ffc, fc, out=None):
res = ffc(prefix)
res_bash = set(fc(prefix))
retval = set(res) == res_bash
if out:
out.write(f"equal_with_bash({prefix}) {retval} {res}\n")
if not retval:
out.write(" python - bash: %s\n" % (set(res) - res_bash))
out... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 11 | ffc | ref | function | res = ffc(prefix)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 12 | fc | ref | function | res_bash = set(fc(prefix))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 15 | write | ref | function | out.write(f"equal_with_bash({prefix}) {retval} {res}\n")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_argcomplete.py | testing/test_argcomplete.py | 17 | write | ref | function | out.write(" python - bash: %s\n" % (set(res) - res_bash))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.