MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / test_variable_value

Function test_variable_value

pythonFiles/tests/ipython/test_variables.py:41–49  ·  view source on GitHub ↗
(capsys)

Source from the content-addressed store, hash-verified

39 not haveIPython, reason="Can't run variable tests without IPython console"
40)
41def test_variable_value(capsys):
42 from IPython import get_ipython
43
44 # Execute a single cell before we get the variables. This is the variable we'll look for.
45 get_ipython().run_cell("x = 3")
46 vars = get_variables(capsys)
47 varx_value = get_variable_value(vars, "x", capsys)
48 assert varx_value
49 assert varx_value == "3"
50
51
52@pytest.mark.skipif(

Callers

nothing calls this directly

Calls 2

get_variablesFunction · 0.85
get_variable_valueFunction · 0.85

Tested by

no test coverage detected