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/metafunc.py | testing/python/metafunc.py | 115 | test_parametrize_bad_scope | def | function | def test_parametrize_bad_scope(self) -> None:
def func(x):
pass
metafunc = self.Metafunc(func)
with pytest.raises(
fail.Exception,
match=r"parametrize\(\) call in func got an unexpected scope value 'doggy'",
):
metafunc.parametrize("x"... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 116 | func | def | function | def func(x):
raise NotImplementedError()
class Exc(Exception):
def __repr__(self):
return "Exc(from_gen)"
def gen() -> Iterator[Union[int, None, Exc]]:
yield 0
yield None
yield Exc()
metafunc = self.Metafunc(f... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 119 | Metafunc | ref | function | metafunc = self.Metafunc(func)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 120 | raises | ref | function | with pytest.raises(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 124 | parametrize | ref | function | metafunc.parametrize("x", [1], scope="doggy") # type: ignore[arg-type]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 126 | test_parametrize_request_name | def | function | def test_parametrize_request_name(self, pytester: Pytester) -> None:
"""Show proper error when 'request' is used as a parameter name in parametrize (#6183)"""
def func(request):
raise NotImplementedError()
metafunc = self.Metafunc(func)
with pytest.raises(
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 129 | func | def | function | def func(request):
raise NotImplementedError()
metafunc = self.Metafunc(func)
with pytest.raises(
fail.Exception,
match=r"'request' is a reserved name and cannot be used in @pytest.mark.parametrize",
):
metafunc.parametrize("request", [1])... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 132 | Metafunc | ref | function | metafunc = self.Metafunc(func)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 133 | raises | ref | function | with pytest.raises(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 137 | parametrize | ref | function | metafunc.parametrize("request", [1])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 139 | test_find_parametrized_scope | def | function | def test_find_parametrized_scope(self) -> None:
"""Unit test for _find_parametrized_scope (#3941)."""
from _pytest.python import _find_parametrized_scope
@attr.s
class DummyFixtureDef:
_scope = attr.ib()
fixtures_defs = cast(
Dict[str, Sequence[fixtu... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 144 | DummyFixtureDef | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 150 | DummyFixtureDef | ref | function | session_fix=[DummyFixtureDef(Scope.Session)],
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 151 | DummyFixtureDef | ref | function | package_fix=[DummyFixtureDef(Scope.Package)],
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 152 | DummyFixtureDef | ref | function | module_fix=[DummyFixtureDef(Scope.Module)],
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 153 | DummyFixtureDef | ref | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 154 | DummyFixtureDef | ref | function | func_fix=[DummyFixtureDef(Scope.Function)],
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 160 | find_scope | def | function | def find_scope(argnames, indirect):
return _find_parametrized_scope(argnames, fixtures_defs, indirect=indirect)
assert find_scope(["func_fix"], indirect=_True) == Scope.Function
assert find_scope(["class_fix"], indirect=_True) == Scope.Class
assert find_scope(["module_fix"],... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 161 | _find_parametrized_scope | ref | function | return _find_parametrized_scope(argnames, fixtures_defs, indirect=indirect)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 163 | find_scope | ref | function | assert find_scope(["func_fix"], indirect=True) == Scope.Function
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 164 | find_scope | ref | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 165 | find_scope | ref | function | assert find_scope(["module_fix"], indirect=True) == Scope.Module
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 166 | find_scope | ref | function | assert find_scope(["package_fix"], indirect=True) == Scope.Package
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 167 | find_scope | ref | function | assert find_scope(["session_fix"], indirect=True) == Scope.Session
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 169 | find_scope | ref | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 170 | find_scope | ref | function | assert find_scope(["func_fix", "session_fix"], indirect=True) == Scope.Function
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 171 | find_scope | ref | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 173 | find_scope | ref | function | find_scope(["package_fix", "session_fix"], indirect=True) == Scope.Package
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 175 | find_scope | ref | function | assert find_scope(["module_fix", "session_fix"], indirect=True) == Scope.Module
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 179 | find_scope | ref | function | find_scope(["session_fix", "module_fix"], indirect=False) == Scope.Function
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 182 | find_scope | ref | function | find_scope(["session_fix", "module_fix"], indirect=["module_fix"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 186 | find_scope | ref | function | find_scope(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 192 | test_parametrize_and_id | def | function | def test_parametrize_and_id(self) -> None:
def func(x, y):
pass
metafunc = self.Metafunc(func)
metafunc.parametrize("x", [1, 2], ids=["basic", "advanced"])
metafunc.parametrize("y", ["abc", "def"])
ids = [x.id for x in metafunc._calls]
assert ids == ["ba... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 193 | func | def | function | def func(x, y):
pass
metafunc = self.Metafunc(func)
metafunc.parametrize("x", [1, 2])
pytest.raises(ValueError, lambda: metafunc.parametrize("x", [5, 6]))
pytest.raises(ValueError, lambda: metafunc.parametrize("x", [5, 6]))
metafunc.parametrize("y", [1, 2])
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 196 | Metafunc | ref | function | metafunc = self.Metafunc(func)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 198 | parametrize | ref | function | metafunc.parametrize("x", [1, 2], ids=["basic", "advanced"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 199 | parametrize | ref | function | metafunc.parametrize("y", ["abc", "def"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 203 | test_parametrize_and_id_unicode | def | function | def test_parametrize_and_id_unicode(self) -> None:
"""Allow unicode strings for "ids" parameter in Python 2 (##1905)"""
def func(x):
pass
metafunc = self.Metafunc(func)
metafunc.parametrize("x", [1, 2], ids=["basic", "advanced"])
ids = [x.id for x in metafunc._c... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 206 | func | def | function | def func(x):
raise NotImplementedError()
class Exc(Exception):
def __repr__(self):
return "Exc(from_gen)"
def gen() -> Iterator[Union[int, None, Exc]]:
yield 0
yield None
yield Exc()
metafunc = self.Metafunc(f... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 209 | Metafunc | ref | function | metafunc = self.Metafunc(func)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 210 | parametrize | ref | function | metafunc.parametrize("x", [1, 2], ids=["basic", "advanced"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 214 | test_parametrize_with_wrong_number_of_ids | def | function | def test_parametrize_with_wrong_number_of_ids(self) -> None:
def func(x, y):
pass
metafunc = self.Metafunc(func)
with pytest.raises(fail.Exception):
metafunc.parametrize("x", [1, 2], ids=["basic"])
with pytest.raises(fail.Exception):
metafunc.pa... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 215 | func | def | function | def func(x, y):
pass
metafunc = self.Metafunc(func)
metafunc.parametrize("x", [1, 2])
pytest.raises(ValueError, lambda: metafunc.parametrize("x", [5, 6]))
pytest.raises(ValueError, lambda: metafunc.parametrize("x", [5, 6]))
metafunc.parametrize("y", [1, 2])
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 218 | Metafunc | ref | function | metafunc = self.Metafunc(func)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 220 | raises | ref | function | with pytest.raises(fail.Exception):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 221 | parametrize | ref | function | metafunc.parametrize("x", [1, 2], ids=["basic"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 223 | raises | ref | function | with pytest.raises(fail.Exception):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 224 | parametrize | ref | function | metafunc.parametrize(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 228 | test_parametrize_ids_iterator_without_mark | def | function | def test_parametrize_ids_iterator_without_mark(self) -> None:
def func(x, y):
pass
it = itertools.count()
metafunc = self.Metafunc(func)
metafunc.parametrize("x", [1, 2], ids=it)
metafunc.parametrize("y", [3, 4], ids=it)
ids = [x.id for x in metafunc._ca... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 229 | func | def | function | def func(x, y):
pass
metafunc = self.Metafunc(func)
metafunc.parametrize("x", [1, 2])
pytest.raises(ValueError, lambda: metafunc.parametrize("x", [5, 6]))
pytest.raises(ValueError, lambda: metafunc.parametrize("x", [5, 6]))
metafunc.parametrize("y", [1, 2])
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 234 | Metafunc | ref | function | metafunc = self.Metafunc(func)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 235 | parametrize | ref | function | metafunc.parametrize("x", [1, 2], ids=it)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 236 | parametrize | ref | function | metafunc.parametrize("y", [3, 4], ids=it)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 240 | Metafunc | ref | function | metafunc = self.Metafunc(func)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 241 | parametrize | ref | function | metafunc.parametrize("x", [1, 2], ids=it)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 242 | parametrize | ref | function | metafunc.parametrize("y", [3, 4], ids=it)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 246 | test_parametrize_empty_list | def | function | def test_parametrize_empty_list(self) -> None:
"""#510"""
def func(y):
pass
class MockConfig:
def getini(self, name):
return ""
@property
def hook(self):
return self
def pytest_make_parametrize_id... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 249 | func | def | function | def func(y):
pass
class MockConfig:
def getini(self, name):
return ""
@property
def hook(self):
return self
def pytest_make_parametrize_id(self, **kw):
pass
metafunc = self.Metafunc(fu... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 252 | MockConfig | def | class | getini hook pytest_make_parametrize_id __init__ hook pytest_make_parametrize_id getini __init__ hook pytest_make_parametrize_id getini __init__ hook pytest_make_parametrize_id getini |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 253 | getini | def | function | def getini(self, name):
return ""
@property
def hook(self):
return self
def pytest_make_parametrize_id(self, **kw):
pass
metafunc = self.Metafunc(func, MockConfig())
metafunc.parametrize("y", [])
a... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 257 | hook | def | function | def hook(self):
return self
def pytest_make_parametrize_id(self, **kw):
pass
metafunc = self.Metafunc(func, MockConfig())
metafunc.parametrize("y", [])
assert "skip" == metafunc._calls[0].marks[0].name
def test_parametrize_with_usero... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 260 | pytest_make_parametrize_id | def | function | def pytest_make_parametrize_id(self, **kw):
pass
metafunc = self.Metafunc(func, MockConfig())
metafunc.parametrize("y", [])
assert "skip" == metafunc._calls[0].marks[0].name
def test_parametrize_with_userobjects(self) -> None:
def func(x, y):
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 263 | Metafunc | ref | function | metafunc = self.Metafunc(func, MockConfig())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 263 | MockConfig | ref | function | metafunc = self.Metafunc(func, MockConfig())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 264 | parametrize | ref | function | metafunc.parametrize("y", [])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 267 | test_parametrize_with_userobjects | def | function | def test_parametrize_with_userobjects(self) -> None:
def func(x, y):
pass
metafunc = self.Metafunc(func)
class A:
pass
metafunc.parametrize("x", [A(), A()])
metafunc.parametrize("y", list("ab"))
assert metafunc._calls[0].id == "x0-a"
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 268 | func | def | function | def func(x, y):
pass
metafunc = self.Metafunc(func)
metafunc.parametrize("x", [1, 2])
pytest.raises(ValueError, lambda: metafunc.parametrize("x", [5, 6]))
pytest.raises(ValueError, lambda: metafunc.parametrize("x", [5, 6]))
metafunc.parametrize("y", [1, 2])
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 271 | Metafunc | ref | function | metafunc = self.Metafunc(func)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 273 | A | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 276 | parametrize | ref | function | metafunc.parametrize("x", [A(), A()])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 276 | A | ref | function | metafunc.parametrize("x", [A(), A()])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 276 | A | ref | function | metafunc.parametrize("x", [A(), A()])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 277 | parametrize | ref | function | metafunc.parametrize("y", list("ab"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 283 | given | ref | function | @hypothesis.given(strategies.text() | strategies.binary())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 283 | text | ref | function | @hypothesis.given(strategies.text() | strategies.binary())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 283 | binary | ref | function | @hypothesis.given(strategies.text() | strategies.binary())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 284 | settings | ref | function | @hypothesis.settings(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 287 | test_idval_hypothesis | def | function | def test_idval_hypothesis(self, value) -> None:
escaped = _idval(value, "a", 6, None, nodeid=None, config=None)
assert isinstance(escaped, str)
escaped.encode("ascii")
def test_unicode_idval(self) -> None:
"""Test that Unicode strings outside the ASCII character set get
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 288 | _idval | ref | function | escaped = _idval(value, "a", 6, None, nodeid=None, config=None)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 292 | test_unicode_idval | def | function | def test_unicode_idval(self) -> None:
"""Test that Unicode strings outside the ASCII character set get
escaped, using byte escapes if they're in that range or unicode
escapes if they're not.
"""
values = [
("", r""),
("ascii", r"ascii"),
(... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 310 | _idval | ref | function | assert _idval(val, "a", 6, None, nodeid=None, config=None) == expected
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 312 | test_unicode_idval_with_config | def | function | def test_unicode_idval_with_config(self) -> None:
"""Unit test for expected behavior to obtain ids with
disable_test_id_escaping_and_forfeit_all_rights_to_community_support
option (#5294)."""
class MockConfig:
def __init__(self, config):
self.config = con... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 317 | MockConfig | def | class | getini hook pytest_make_parametrize_id __init__ hook pytest_make_parametrize_id getini __init__ hook pytest_make_parametrize_id getini __init__ hook pytest_make_parametrize_id getini |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 322 | hook | def | function | def hook(self):
return self
def pytest_make_parametrize_id(self, **kw):
pass
metafunc = self.Metafunc(func, MockConfig())
metafunc.parametrize("y", [])
assert "skip" == metafunc._calls[0].marks[0].name
def test_parametrize_with_usero... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 325 | pytest_make_parametrize_id | def | function | def pytest_make_parametrize_id(self, **kw):
pass
metafunc = self.Metafunc(func, MockConfig())
metafunc.parametrize("y", [])
assert "skip" == metafunc._calls[0].marks[0].name
def test_parametrize_with_userobjects(self) -> None:
def func(x, y):
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 328 | getini | def | function | def getini(self, name):
return ""
@property
def hook(self):
return self
def pytest_make_parametrize_id(self, **kw):
pass
metafunc = self.Metafunc(func, MockConfig())
metafunc.parametrize("y", [])
a... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 334 | MockConfig | ref | function | ("ação", MockConfig({option: True}), "ação"),
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 335 | MockConfig | ref | function | ("ação", MockConfig({option: False}), "a\\xe7\\xe3o"),
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 338 | _idval | ref | function | actual = _idval(val, "a", 6, None, nodeid=None, config=config)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 341 | test_bytes_idval | def | function | def test_bytes_idval(self) -> None:
"""Unit test for the expected behavior to obtain ids for parametrized
bytes values: bytes objects are always escaped using "binary escape"."""
values = [
(b"", r""),
(b"\xc3\xb4\xff\xe4", r"\xc3\xb4\xff\xe4"),
(b"ascii",... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 351 | _idval | ref | function | assert _idval(val, "a", 6, idfn=None, nodeid=None, config=None) == expected
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 353 | test_class_or_function_idval | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 357 | TestClass | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 360 | test_function | def | function | def test_function():
pass
values = [(TestClass, "TestClass"), (test_function, "test_function")]
for val, expected in values:
assert _idval(val, "a", 6, None, nodeid=None, config=None) == expected
def test_notset_idval(self) -> None:
"""Test that a NOTSET val... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 365 | _idval | ref | function | assert _idval(val, "a", 6, None, nodeid=None, config=None) == expected
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 367 | test_notset_idval | def | function | def test_notset_idval(self) -> None:
"""Test that a NOTSET value (used by an empty parameterset) generates
a proper ID.
Regression test for #7686.
"""
assert _idval(NOTSET, "a", 0, None, nodeid=None, config=None) == "a0"
def test_idmaker_autoname(self) -> None:
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 373 | _idval | ref | function | assert _idval(NOTSET, "a", 0, None, nodeid=None, config=None) == "a0"
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 375 | test_idmaker_autoname | def | function | def test_idmaker_autoname(self) -> None:
"""#250"""
result = idmaker(
("a", "b"), [pytest.param("string", 1.0), pytest.param("st-ring", 2.0)]
)
assert result == ["string-1.0", "st-ring-2.0"]
result = idmaker(
("a", "b"), [pytest.param(object(), 1.0), ... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 377 | idmaker | ref | function | result = idmaker(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/python/metafunc.py | testing/python/metafunc.py | 378 | param | ref | function | ("a", "b"), [pytest.param("string", 1.0), pytest.param("st-ring", 2.0)]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.