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_mark.py | testing/test_mark.py | 819 | listoutcomes | ref | function | passed, skipped, failed = reprec.listoutcomes()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 822 | getcalls | ref | function | dlist = reprec.getcalls("pytest_deselected")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 826 | test_select_starton | def | function | def test_select_starton(self, pytester: Pytester) -> None:
threepass = pytester.makepyfile(
test_threepass="""
def test_one(): assert 1
def test_two(): assert 1
def test_three(): assert 1
"""
)
reprec = pytester.inline_run("-k", "test_t... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 827 | makepyfile | ref | function | threepass = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 834 | inline_run | ref | function | reprec = pytester.inline_run("-k", "test_two:", threepass)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 835 | listoutcomes | ref | function | passed, skipped, failed = reprec.listoutcomes()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 838 | getcalls | ref | function | dlist = reprec.getcalls("pytest_deselected")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 843 | test_keyword_extra | def | function | def test_keyword_extra(self, pytester: Pytester) -> None:
p = pytester.makepyfile(
"""
def test_one():
assert 0
test_one.mykeyword = _True
"""
)
reprec = pytester.inline_run("-k", "mykeyword", p)
passed, skipped, failed = repre... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 844 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 851 | inline_run | ref | function | reprec = pytester.inline_run("-k", "mykeyword", p)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 852 | countoutcomes | ref | function | passed, skipped, failed = reprec.countoutcomes()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 856 | test_keyword_extra_dash | def | function | def test_keyword_extra_dash(self, pytester: Pytester) -> None:
p = pytester.makepyfile(
"""
def test_one():
assert 0
test_one.mykeyword = _True
"""
)
# with argparse the argument to an option cannot
# start with '-'
rep... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 857 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 866 | inline_run | ref | function | reprec = pytester.inline_run("-k", "-mykeyword", p)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 867 | countoutcomes | ref | function | passed, skipped, failed = reprec.countoutcomes()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 870 | parametrize | ref | function | @pytest.mark.parametrize(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 874 | test_no_magic_values | def | function | def test_no_magic_values(self, pytester: Pytester, keyword: str) -> None:
"""Make sure the tests do not match on magic values,
no double underscored values, like '__dict__' and '+'.
"""
p = pytester.makepyfile(
"""
def test_one(): assert 1
"""
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 878 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 884 | inline_run | ref | function | reprec = pytester.inline_run("-k", keyword, p)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 885 | countoutcomes | ref | function | passed, skipped, failed = reprec.countoutcomes()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 886 | getcalls | ref | function | dlist = reprec.getcalls("pytest_deselected")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 891 | test_no_match_directories_outside_the_suite | def | function | def test_no_match_directories_outside_the_suite(self, pytester: Pytester) -> None:
"""`-k` should not match against directories containing the test suite (#7040)."""
test_contents = """
def test_aaa(): pass
def test_ddd(): pass
"""
pytester.makepyfile(
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 897 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 901 | get_collected_names | def | function | def get_collected_names(*args):
_, rec = pytester.inline_genitems(*args)
calls = rec.getcalls("pytest_collection_finish")
assert len(calls) == 1
return [x.name for x in calls[0].session.items]
# sanity check: collect both tests in normal runs
asse... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 902 | inline_genitems | ref | function | _, rec = pytester.inline_genitems(*args)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 903 | getcalls | ref | function | calls = rec.getcalls("pytest_collection_finish")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 908 | get_collected_names | ref | function | assert get_collected_names() == ["test_aaa", "test_ddd"]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 911 | get_collected_names | ref | function | assert get_collected_names("-k", pytester._name) == []
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 917 | get_collected_names | ref | function | assert get_collected_names("-k", "ddd") == ["test_ddd"]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 920 | TestMarkDecorator | def | class | test__eq__ test_aliases |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 921 | parametrize | ref | function | @pytest.mark.parametrize(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 924 | foo | ref | function | (pytest.mark.foo(), pytest.mark.foo(), True),
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 924 | foo | ref | function | (pytest.mark.foo(), pytest.mark.foo(), True),
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 925 | foo | ref | function | (pytest.mark.foo(), pytest.mark.bar(), False),
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 925 | bar | ref | function | (pytest.mark.foo(), pytest.mark.bar(), False),
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 926 | foo | ref | function | (pytest.mark.foo(), "bar", False),
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 927 | bar | ref | function | ("foo", pytest.mark.bar(), False),
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 930 | test__eq__ | def | function | def test__eq__(self, lhs, rhs, expected) -> None:
assert (lhs == rhs) == expected
def test_aliases(self) -> None:
md = pytest.mark.foo(1, "2", three=3)
assert md.name == "foo"
assert md.args == (1, "2")
assert md.kwargs == {"three": 3}
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 933 | test_aliases | def | function | def test_aliases(self) -> None:
md = pytest.mark.foo(1, "2", three=3)
assert md.name == "foo"
assert md.args == (1, "2")
assert md.kwargs == {"three": 3}
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 934 | foo | ref | function | md = pytest.mark.foo(1, "2", three=3)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 940 | parametrize | ref | function | @pytest.mark.parametrize("mark", [None, "", "skip", "xfail"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 941 | test_parameterset_for_parametrize_marks | def | function | def test_parameterset_for_parametrize_marks(
pytester: Pytester, mark: Optional[str]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 945 | makeini | ref | function | pytester.makeini(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 954 | parseconfig | ref | function | config = pytester.parseconfig()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 957 | pytest_configure | ref | function | pytest_configure(config)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 958 | get_empty_parameterset_mark | ref | function | result_mark = get_empty_parameterset_mark(config, ["a"], all)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 968 | test_parameterset_for_fail_at_collect | def | function | def test_parameterset_for_fail_at_collect(pytester: Pytester) -> None:
pytester.makeini(
"""
[pytest]
{}=fail_at_collect
""".format(
EMPTY_PARAMETERSET_OPTION
)
)
config = pytester.parseconfig()
from _pytest.mark import pytest_configure, get_empty_parameterset_ma... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 969 | makeini | ref | function | pytester.makeini(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 978 | parseconfig | ref | function | config = pytester.parseconfig()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 981 | pytest_configure | ref | function | pytest_configure(config)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 983 | raises | ref | function | with pytest.raises(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 987 | get_empty_parameterset_mark | ref | function | get_empty_parameterset_mark(config, ["a"], pytest_configure)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 989 | makepyfile | ref | function | p1 = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 998 | runpytest | ref | function | result = pytester.runpytest(str(p1))
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 999 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,010 | test_parameterset_for_parametrize_bad_markname | def | function | def test_parameterset_for_parametrize_bad_markname(pytester: Pytester) -> None:
with pytest.raises(pytest.UsageError):
test_parameterset_for_parametrize_marks(pytester, "bad")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,011 | raises | ref | function | with pytest.raises(pytest.UsageError):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,012 | test_parameterset_for_parametrize_marks | ref | function | test_parameterset_for_parametrize_marks(pytester, "bad")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,015 | test_mark_expressions_no_smear | def | function | def test_mark_expressions_no_smear(pytester: Pytester) -> None:
pytester.makepyfile(
"""
import pytest
class BaseTests(object):
def test_something(self):
pass
@pytest.mark.FOO
class TestFooClass(BaseTests):
pass
@pytest.mark.... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,016 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,034 | inline_run | ref | function | reprec = pytester.inline_run("-m", "FOO")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,035 | countoutcomes | ref | function | passed, skipped, failed = reprec.countoutcomes()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,036 | getcalls | ref | function | dlist = reprec.getcalls("pytest_deselected")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,050 | test_addmarker_order | def | function | def test_addmarker_order(pytester) -> None:
session = mock.Mock()
session.own_markers = []
session.parent = None
session.nodeid = ""
session.path = pytester.path
node = Node.from_parent(session, name="Test")
node.add_marker("foo")
node.add_marker("bar")
node.add_marker("baz", append=... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,056 | from_parent | ref | function | node = Node.from_parent(session, name="Test")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,057 | add_marker | ref | function | node.add_marker("foo")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,058 | add_marker | ref | function | node.add_marker("bar")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,059 | add_marker | ref | function | node.add_marker("baz", append=False)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,060 | iter_markers | ref | function | extracted = [x.name for x in node.iter_markers()]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,064 | filterwarnings | ref | function | @pytest.mark.filterwarnings("ignore")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,065 | test_markers_from_parametrize | def | function | def test_markers_from_parametrize(pytester: Pytester) -> None:
"""#3605"""
pytester.makepyfile(
"""
import pytest
first_custom_mark = pytest.mark.custom_marker
custom_mark = pytest.mark.custom_mark
@pytest.fixture(autouse=_True)
def trigger(request):
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,067 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,098 | runpytest | ref | function | result = pytester.runpytest()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,099 | assert_outcomes | ref | function | result.assert_outcomes(passed=4)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,102 | test_pytest_param_id_requires_string | def | function | def test_pytest_param_id_requires_string() -> None:
with pytest.raises(TypeError) as excinfo:
pytest.param(id=_True) # type: ignore[arg-type]
(msg,) = excinfo.value.args
assert msg == "Expected id to be a string, got <class 'bool'>: _True"
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,103 | raises | ref | function | with pytest.raises(TypeError) as excinfo:
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,104 | param | ref | function | pytest.param(id=True) # type: ignore[arg-type]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,109 | parametrize | ref | function | @pytest.mark.parametrize("s", (None, "hello world"))
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,110 | test_pytest_param_id_allows_none_or_string | def | function | def test_pytest_param_id_allows_none_or_string(s) -> None:
assert pytest.param(id=s)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,111 | param | ref | function | assert pytest.param(id=s)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,114 | parametrize | ref | function | @pytest.mark.parametrize("expr", ("NOT internal_err", "NOT (internal_err)", "bogus/"))
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,115 | test_marker_expr_eval_failure_handling | def | function | def test_marker_expr_eval_failure_handling(pytester: Pytester, expr) -> None:
foo = pytester.makepyfile(
"""
import pytest
@pytest.mark.internal_err
def test_foo():
pass
"""
)
expected = f"ERROR: Wrong expression passed to '-m': {expr}: *"
result = py... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,116 | makepyfile | ref | function | foo = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,126 | runpytest | ref | function | result = pytester.runpytest(foo, "-m", expr)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark.py | testing/test_mark.py | 1,127 | fnmatch_lines | ref | function | result.stderr.fnmatch_lines([expected])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark_expression.py | testing/test_mark_expression.py | 7 | evaluate | def | function | def evaluate(input: str, matcher: Callable[[str], bool]) -> bool:
return Expression.compile(input).evaluate(matcher)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark_expression.py | testing/test_mark_expression.py | 8 | evaluate | ref | function | return Expression.compile(input).evaluate(matcher)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark_expression.py | testing/test_mark_expression.py | 11 | test_empty_is_false | def | function | def test_empty_is_false() -> None:
assert not evaluate("", lambda ident: _False)
assert not evaluate("", lambda ident: _True)
assert not evaluate(" ", lambda ident: _False)
assert not evaluate("\t", lambda ident: _False)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark_expression.py | testing/test_mark_expression.py | 12 | evaluate | ref | function | assert not evaluate("", lambda ident: False)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark_expression.py | testing/test_mark_expression.py | 13 | evaluate | ref | function | assert not evaluate("", lambda ident: True)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark_expression.py | testing/test_mark_expression.py | 14 | evaluate | ref | function | assert not evaluate(" ", lambda ident: False)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark_expression.py | testing/test_mark_expression.py | 15 | evaluate | ref | function | assert not evaluate("\t", lambda ident: False)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark_expression.py | testing/test_mark_expression.py | 18 | parametrize | ref | function | @pytest.mark.parametrize(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark_expression.py | testing/test_mark_expression.py | 47 | test_basic | def | function | def test_basic(expr: str, expected: bool) -> None:
matcher = {"true": _True, "false": _False}.__getitem__
assert evaluate(expr, matcher) is expected
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark_expression.py | testing/test_mark_expression.py | 49 | evaluate | ref | function | assert evaluate(expr, matcher) is expected
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark_expression.py | testing/test_mark_expression.py | 52 | parametrize | ref | function | @pytest.mark.parametrize(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark_expression.py | testing/test_mark_expression.py | 63 | test_syntax_oddeties | def | function | def test_syntax_oddeties(expr: str, expected: bool) -> None:
matcher = {"true": _True, "false": _False}.__getitem__
assert evaluate(expr, matcher) is expected
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark_expression.py | testing/test_mark_expression.py | 65 | evaluate | ref | function | assert evaluate(expr, matcher) is expected
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark_expression.py | testing/test_mark_expression.py | 68 | parametrize | ref | function | @pytest.mark.parametrize(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_mark_expression.py | testing/test_mark_expression.py | 116 | test_syntax_errors | def | function | def test_syntax_errors(expr: str, column: int, message: str) -> None:
with pytest.raises(ParseError) as excinfo:
evaluate(expr, lambda ident: _True)
assert excinfo.value.column == column
assert excinfo.value.message == message
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.