(capsys)
| 39 | not haveIPython, reason="Can't run variable tests without IPython console" |
| 40 | ) |
| 41 | def 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( |
nothing calls this directly
no test coverage detected