-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Tests for prompting to install missing ipykernel #14266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
}); | ||
|
||
test('Ensure prompt is displayed when ipykernel module is not found and it gets installed', async () => { | ||
const promptDisplayed = createDeferred(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test is simple:
- Create a notebook with existing kernel
- Ensure kernel exists, however ipykernel is not installed (to replicate bug).
- Open notebook
- Confirm prompt to install ipykernel is displayed
- Click
Install
in prompt - Verify
ipykernel
was successfully installed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically this is a full end to end test
- With real bits
- Shutting down Jupyter once done (same code as used in Native Notebooks)
- This is a very slow test, we are installing IPYKernel (i don't expect other tests to be as slow)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we already have the '.ui.test.ts' files? Wondering why you created this new extension.
Or is this just in preparation for consolidating them in the other repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have anymore ui.test.ts
. We removed UI Tests, as it wasn't getting used.
Going with vscode.test.ts
as this what was agreed on Teams for tests running with VS Code.
Or is this just in preparation for consolidating them in the other repo?
Yes
Codecov Report
@@ Coverage Diff @@
## main #14266 +/- ##
==========================================
- Coverage 59.96% 59.91% -0.05%
==========================================
Files 706 709 +3
Lines 39180 39334 +154
Branches 5681 5698 +17
==========================================
+ Hits 23494 23567 +73
- Misses 14449 14529 +80
- Partials 1237 1238 +1
Continue to review full report at Codecov.
|
python -m pip uninstall ipykernel --yes | ||
displayName: 'Prepare Virtual Env for Kernel Tests' | ||
workingDirectory: $(Build.SourcesDirectory)/src/test/datascience | ||
condition: and(succeeded(), contains(variables['TestsToRun'], 'testDataScienceInVSCode')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Only run on linux agent.
This is a slow test, no point running on all OS & Python versions (code path will be identical).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that for linux only even locally? If not then I would think the activate command needs to be different for windows as it doesn't use source
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linux only on CI, locally it will work for Windows. However its upto the engineer to create the venv & ensure it has been registered as a kernel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DonJayamanne seems fair.
Kudos, SonarCloud Quality Gate passed!
|
"env": { | ||
"VSC_PYTHON_CI_TEST_GREP": "", // Modify this to run a subset of the single workspace tests | ||
"VSC_PYTHON_CI_TEST_INVERT_GREP": "", // Initialize this to invert the grep (exclude tests with value defined in grep). | ||
"CI_PYTHON_PATH": "<PythonPath>", // Initialize this to invert the grep (exclude tests with value defined in grep). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually add an X to the beginning of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, this is required. X
only when its optional.
* Remove cell index property and use build in prop (#14239) * Update other cells in cell execution (#14240) * Tests for prompting to install missing ipykernel (#14266) * Treat Native notebook tests as VS Code tests (#14282) * Fixes to blowing away of kernel info & not using right startup info (… … * Default cell language for native notebooks (#14314) * Ignore formatting in ipynb when dealing with trust (#14333) * Fixes to trust service (#14352) * Change `IPython kernel` to `Jupyter kernel` (#14375) * Trust for native notebooks (#14353)
For #13970
Basically as discussed in our other branch,
*.vscode.test.ts
tests to run in VSCodeds.test.ts
as we've decided to do in other branch - probably already done).I need to commit a few other changes, but that's related to setting up of the tests (changes to
scripts
in package & the like).Let me know what your initial thoughts are.