-
Notifications
You must be signed in to change notification settings - Fork 290
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
path.sep
instead of \\
when translating IW input box URI to n…
…otebook URI (#13269)
- Loading branch information
Showing
2 changed files
with
34 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/test/datascience/notebook/intellisense/notebookPythonPathService.unit.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
import { assert } from 'chai'; | ||
import { getNotebookUriFromInputBoxUri } from '../../../../standalone/intellisense/notebookPythonPathService.node'; | ||
import { Uri } from 'vscode'; | ||
|
||
suite(`DataScience - VSCode Intellisense Notebook - PythonPath service @lsp`, function () { | ||
test('Not an input box', async () => { | ||
const notebookUri = getNotebookUriFromInputBoxUri(Uri.file('/foo/bar.py')); | ||
assert.notOk(notebookUri); | ||
}); | ||
test('Input box', async () => { | ||
const notebookUri = getNotebookUriFromInputBoxUri(Uri.parse('vscode-interactive-input:/InteractiveInput-3')); | ||
assert.ok(notebookUri); | ||
assert.strictEqual( | ||
notebookUri!.toString(), | ||
Uri.from({ scheme: 'vscode-interactive', path: 'Interactive-3.interactive' }).toString() | ||
); | ||
}); | ||
}); |