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/acceptance_test.py | testing/acceptance_test.py | 1,009 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,030 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,031 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["* 1 passed *"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,034 | test_fixture_values_leak | def | function | def test_fixture_values_leak(pytester: Pytester) -> None:
"""Ensure that fixture objects are properly destroyed by the garbage collector at the end of their expected
life-times (#2981).
"""
pytester.makepyfile(
"""
import attr
import gc
import pytest
import weakre... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,038 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,078 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,079 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["* 2 passed *"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,082 | test_fixture_order_respects_scope | def | function | def test_fixture_order_respects_scope(pytester: Pytester) -> None:
"""Ensure that fixtures are created according to scope order (#2405)."""
pytester.makepyfile(
"""
import pytest
data = {}
@pytest.fixture(scope='module')
def clean_data():
data.clear()
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,084 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,103 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,107 | test_frame_leak_on_failing_test | def | function | def test_frame_leak_on_failing_test(pytester: Pytester) -> None:
"""Pytest would leak garbage referencing the frames of tests that failed
that could never be reclaimed (#2798).
Unfortunately it was not possible to remove the actual circles because most of them
are made of traceback objects which cannot... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,115 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,136 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,137 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*1 failed, 1 passed in*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,140 | test_fixture_mock_integration | def | function | def test_fixture_mock_integration(pytester: Pytester) -> None:
"""Test that decorators applied to fixture are left working (#3774)"""
p = pytester.copy_example("acceptance/fixture_mock_integration.py")
result = pytester.runpytest(p)
result.stdout.fnmatch_lines(["*1 passed*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,142 | copy_example | ref | function | p = pytester.copy_example("acceptance/fixture_mock_integration.py")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,143 | runpytest | ref | function | result = pytester.runpytest(p)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,144 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*1 passed*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,147 | test_usage_error_code | def | function | def test_usage_error_code(pytester: Pytester) -> None:
result = pytester.runpytest("-unknown-option-")
assert result.ret == ExitCode.USAGE_ERROR
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,148 | runpytest | ref | function | result = pytester.runpytest("-unknown-option-")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,153 | test_warn_on_async_function | def | function | def test_warn_on_async_function(pytester: Pytester) -> None:
# In the below we .close() the coroutine only to avoid
# "RuntimeWarning: coroutine 'test_2' was never awaited"
# which messes with other tests.
pytester.makepyfile(
test_async="""
async def test_1():
pass
a... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,157 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,169 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,170 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,186 | test_warn_on_async_gen_function | def | function | def test_warn_on_async_gen_function(pytester: Pytester) -> None:
pytester.makepyfile(
test_async="""
async def test_1():
yield
async def test_2():
yield
def test_3():
return test_2()
"""
)
result = pytester.runpytest()
result.stdout... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,187 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,197 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,198 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,213 | test_pdb_can_be_rewritten | def | function | def test_pdb_can_be_rewritten(pytester: Pytester) -> None:
pytester.makepyfile(
**{
"conftest.py": """
import pytest
pytest.register_assert_rewrite("pdb")
""",
"__init__.py": "",
"pdb.py": """
def check():
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,214 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,234 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess("-p", "no:debugging", "-vv")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,235 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,250 | test_tee_stdio_captures_and_live_prints | def | function | def test_tee_stdio_captures_and_live_prints(pytester: Pytester) -> None:
testpath = pytester.makepyfile(
"""
import sys
def test_simple():
print ("@this is stdout@")
print ("@this is stderr@", file=sys.stderr)
"""
)
result = pytester.runpytest_subprocess(
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,251 | makepyfile | ref | function | testpath = pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,259 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,268 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*@this is stdout@*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,269 | fnmatch_lines | ref | function | result.stderr.fnmatch_lines(["*@this is stderr@*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,272 | joinpath | ref | function | with open(pytester.path.joinpath("output.xml")) as f:
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,278 | skipif | ref | function | @pytest.mark.skipif(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,282 | test_no_brokenpipeerror_message | def | function | def test_no_brokenpipeerror_message(pytester: Pytester) -> None:
"""Ensure that the broken pipe error message is supressed.
In some Python versions, it reaches sys.unraisablehook, in others
a BrokenPipeError exception is propagated, but either way it prints
to stderr on shutdown, so checking nothing is... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 1,289 | _getpytestargs | ref | function | popen = pytester.popen((*pytester._getpytestargs(), "--help"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 14 | test_ne | def | function | def test_ne() -> None:
code1 = Code(compile('foo = "bar"', "", "exec"))
assert code1 == code1
code2 = Code(compile('foo = "baz"', "", "exec"))
assert code2 != code1
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 15 | Code | ref | function | code1 = Code(compile('foo = "bar"', "", "exec"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 17 | Code | ref | function | code2 = Code(compile('foo = "baz"', "", "exec"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 21 | test_code_gives_back_name_for_not_existing_file | def | function | def test_code_gives_back_name_for_not_existing_file() -> None:
name = "abc-123"
co_code = compile("pass\n", name, "exec")
assert co_code.co_filename == name
code = Code(co_code)
assert str(code.path) == name
assert code.fullsource is None
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 25 | Code | ref | function | code = Code(co_code)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 30 | test_code_from_function_with_class | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 31 | A | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 34 | raises | ref | function | with pytest.raises(TypeError):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 35 | from_function | ref | function | Code.from_function(A)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 38 | x | def | function | def x() -> None:
raise NotImplementedError()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 42 | test_code_fullsource | def | function | def test_code_fullsource() -> None:
code = Code.from_function(x)
full = code.fullsource
assert "test_code_fullsource()" in str(full)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 43 | from_function | ref | function | code = Code.from_function(x)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 48 | test_code_source | def | function | def test_code_source() -> None:
code = Code.from_function(x)
src = code.source()
expected = """def x() -> None:
raise NotImplementedError()"""
assert str(src) == expected
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 49 | from_function | ref | function | code = Code.from_function(x)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 50 | source | ref | function | src = code.source()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 56 | test_frame_getsourcelineno_myself | def | function | def test_frame_getsourcelineno_myself() -> None:
def func() -> FrameType:
return sys._getframe(0)
f = Frame(func())
source, lineno = f.code.fullsource, f.lineno
assert source is not None
assert source[lineno].startswith(" return sys._getframe(0)")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 57 | func | def | function | def func() -> FrameType:
return sys._getframe(0)
f = Frame(func())
source, lineno = f.code.fullsource, f.lineno
assert source is not None
assert source[lineno].startswith(" return sys._getframe(0)")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 60 | Frame | ref | function | f = Frame(func())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 60 | func | ref | function | f = Frame(func())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 66 | test_getstatement_empty_fullsource | def | function | def test_getstatement_empty_fullsource() -> None:
def func() -> FrameType:
return sys._getframe(0)
f = Frame(func())
with mock.patch.object(f.code.__class__, "fullsource", None):
assert f.statement == Source("")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 67 | func | def | function | def func() -> FrameType:
return sys._getframe(0)
f = Frame(func())
source, lineno = f.code.fullsource, f.lineno
assert source is not None
assert source[lineno].startswith(" return sys._getframe(0)")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 70 | Frame | ref | function | f = Frame(func())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 70 | func | ref | function | f = Frame(func())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 72 | Source | ref | function | assert f.statement == Source("")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 75 | test_code_from_func | def | function | def test_code_from_func() -> None:
co = Code.from_function(test_frame_getsourcelineno_myself)
assert co.firstlineno
assert co.path
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 76 | from_function | ref | function | co = Code.from_function(test_frame_getsourcelineno_myself)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 81 | test_unicode_handling | def | function | def test_unicode_handling() -> None:
value = "ąć".encode()
def f() -> None:
raise Exception(value)
excinfo = pytest.raises(Exception, f)
str(excinfo)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 84 | f | def | function | def f() -> None:
raise Exception(value)
excinfo = pytest.raises(Exception, f)
str(excinfo)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 87 | raises | ref | function | excinfo = pytest.raises(Exception, f)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 91 | test_code_getargs | def | function | def test_code_getargs() -> None:
def f1(x):
raise NotImplementedError()
c1 = Code.from_function(f1)
assert c1.getargs(var=_True) == ("x",)
def f2(x, *y):
raise NotImplementedError()
c2 = Code.from_function(f2)
assert c2.getargs(var=_True) == ("x", "y")
def f3(x, **z):
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 92 | f1 | def | function | def f1(x):
raise NotImplementedError()
c1 = Code.from_function(f1)
assert c1.getargs(var=_True) == ("x",)
def f2(x, *y):
raise NotImplementedError()
c2 = Code.from_function(f2)
assert c2.getargs(var=_True) == ("x", "y")
def f3(x, **z):
raise NotImplementedError()
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 95 | from_function | ref | function | c1 = Code.from_function(f1)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 96 | getargs | ref | function | assert c1.getargs(var=True) == ("x",)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 98 | f2 | def | function | def f2(x, *y):
raise NotImplementedError()
c2 = Code.from_function(f2)
assert c2.getargs(var=_True) == ("x", "y")
def f3(x, **z):
raise NotImplementedError()
c3 = Code.from_function(f3)
assert c3.getargs(var=_True) == ("x", "z")
def f4(x, *y, **z):
raise NotImplem... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 101 | from_function | ref | function | c2 = Code.from_function(f2)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 102 | getargs | ref | function | assert c2.getargs(var=True) == ("x", "y")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 104 | f3 | def | function | def f3(x, **z):
raise NotImplementedError()
c3 = Code.from_function(f3)
assert c3.getargs(var=_True) == ("x", "z")
def f4(x, *y, **z):
raise NotImplementedError()
c4 = Code.from_function(f4)
assert c4.getargs(var=_True) == ("x", "y", "z")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 107 | from_function | ref | function | c3 = Code.from_function(f3)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 108 | getargs | ref | function | assert c3.getargs(var=True) == ("x", "z")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 110 | f4 | def | function | def f4(x, *y, **z):
raise NotImplementedError()
c4 = Code.from_function(f4)
assert c4.getargs(var=_True) == ("x", "y", "z")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 113 | from_function | ref | function | c4 = Code.from_function(f4)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 114 | getargs | ref | function | assert c4.getargs(var=True) == ("x", "y", "z")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 117 | test_frame_getargs | def | function | def test_frame_getargs() -> None:
def f1(x) -> FrameType:
return sys._getframe(0)
fr1 = Frame(f1("a"))
assert fr1.getargs(var=_True) == [("x", "a")]
def f2(x, *y) -> FrameType:
return sys._getframe(0)
fr2 = Frame(f2("a", "b", "c"))
assert fr2.getargs(var=_True) == [("x", "a"),... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 118 | f1 | def | function | def f1(x) -> FrameType:
return sys._getframe(0)
fr1 = Frame(f1("a"))
assert fr1.getargs(var=_True) == [("x", "a")]
def f2(x, *y) -> FrameType:
return sys._getframe(0)
fr2 = Frame(f2("a", "b", "c"))
assert fr2.getargs(var=_True) == [("x", "a"), ("y", ("b", "c"))]
def f3(x,... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 121 | Frame | ref | function | fr1 = Frame(f1("a"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 121 | f1 | ref | function | fr1 = Frame(f1("a"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 122 | getargs | ref | function | assert fr1.getargs(var=True) == [("x", "a")]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 124 | f2 | def | function | def f2(x, *y) -> FrameType:
return sys._getframe(0)
fr2 = Frame(f2("a", "b", "c"))
assert fr2.getargs(var=_True) == [("x", "a"), ("y", ("b", "c"))]
def f3(x, **z) -> FrameType:
return sys._getframe(0)
fr3 = Frame(f3("a", b="c"))
assert fr3.getargs(var=_True) == [("x", "a"), ("... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 127 | Frame | ref | function | fr2 = Frame(f2("a", "b", "c"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 127 | f2 | ref | function | fr2 = Frame(f2("a", "b", "c"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 128 | getargs | ref | function | assert fr2.getargs(var=True) == [("x", "a"), ("y", ("b", "c"))]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 130 | f3 | def | function | def f3(x, **z) -> FrameType:
return sys._getframe(0)
fr3 = Frame(f3("a", b="c"))
assert fr3.getargs(var=_True) == [("x", "a"), ("z", {"b": "c"})]
def f4(x, *y, **z) -> FrameType:
return sys._getframe(0)
fr4 = Frame(f4("a", "b", c="d"))
assert fr4.getargs(var=_True) == [("x", "... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 133 | Frame | ref | function | fr3 = Frame(f3("a", b="c"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 133 | f3 | ref | function | fr3 = Frame(f3("a", b="c"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 134 | getargs | ref | function | assert fr3.getargs(var=True) == [("x", "a"), ("z", {"b": "c"})]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 136 | f4 | def | function | def f4(x, *y, **z) -> FrameType:
return sys._getframe(0)
fr4 = Frame(f4("a", "b", c="d"))
assert fr4.getargs(var=_True) == [("x", "a"), ("y", ("b",)), ("z", {"c": "d"})]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 139 | Frame | ref | function | fr4 = Frame(f4("a", "b", c="d"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 139 | f4 | ref | function | fr4 = Frame(f4("a", "b", c="d"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_code.py | testing/code/test_code.py | 140 | getargs | ref | function | assert fr4.getargs(var=True) == [("x", "a"), ("y", ("b",)), ("z", {"c": "d"})]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.