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

Function test_variable_list

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

Source from the content-addressed store, hash-verified

18 not haveIPython, reason="Can't run variable tests without IPython console"
19)
20def test_variable_list(capsys):
21 from IPython import get_ipython
22
23 # Execute a single cell before we get the variables.
24 get_ipython().run_cell("x = 3\r\ny = 4\r\nz=5")
25 vars = get_variables(capsys)
26 have_x = False
27 have_y = False
28 have_z = False
29 for sub in vars:
30 have_x |= sub["name"] == "x"
31 have_y |= sub["name"] == "y"
32 have_z |= sub["name"] == "z"
33 assert have_x
34 assert have_y
35 assert have_z
36
37
38@pytest.mark.skipif(

Callers

nothing calls this directly

Calls 1

get_variablesFunction · 0.85

Tested by

no test coverage detected