Skip to content

Test: saving an Interactive Window #186196

Closed

Description

Refs: #172974

Complexity: 3

Create Issue


Explanation

This focuses on the behavior for saving an Interactive Window. Current behavior testing should be covered by #186191.

Prerequisites

  • install the pre-release versions of jupyter and python extensions
  • ensure you have a python interpreter installed
  • use Python: create environment to create a local virtual environment in the workspace to keep any changes out of your global python environment
  • You'll need the python kernel packages to run the interpreter as a kernel, but vscode should guide you in installing these when attempting to run anything.

Test steps

  1. Create a python file and add a few code cells (# %% marks a cell), e.g.
# %%
# this will likely show a syntax error in the python file
%pip install matplotlib

# %%
import matplotlib.pyplot as plt
x = [1, 6, 10]
y = [5, 13, 27]
plt.plot(x, y)
plt.plot(y, y)
plt.plot(y, x)

# %%
import time
for i in range(50):
    print(i)
    time.sleep(.1)

# %%
def throwAnError(x):
    raise Exception('This is an error message.')

throwAnError(x)
  1. Execute the code in an interactive window, either Run file in interactive window related commands or the code lenses.
    a. This will open the interactive window editor to be saved
  2. Save the Interactive Window editor. It can only be saved as .ipynb, and the editor will re-open as a notebook.
    a. loading is not supported
  3. Create another interactive window and Switch files.hotExit to off. Then close vscode to ensure you are prompted to save.
    a. test both save and revert options.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions