Run All Cells Notebook Implementation (#4713)

* runAllCells API

* add comment

* more run cells fixes

* Add integration test

* Add multiple cell SQL notebook test

* Comment out python tests as they fail in the lab

* remove unused imports

* PR comments

* Remove localize

* Return true instead of promise.resolve(true)
This commit is contained in:
Chris LaFreniere
2019-04-02 16:47:00 -07:00
committed by GitHub
parent 219dfe66d0
commit 07166fb3cd
13 changed files with 165 additions and 11 deletions

View File

@@ -35,6 +35,38 @@ export const pySparkNotebookContent: azdata.nb.INotebookContents = {
nbformat_minor: 2
};
export const pythonNotebookMultipleCellsContent: azdata.nb.INotebookContents = {
cells: [{
cell_type: CellTypes.Code,
source: '1+1',
metadata: { language: 'python' },
execution_count: 1
}, {
cell_type: CellTypes.Code,
source: '1+2',
metadata: { language: 'python' },
execution_count: 1
}, {
cell_type: CellTypes.Code,
source: '1+3',
metadata: { language: 'python' },
execution_count: 1
}, {
cell_type: CellTypes.Code,
source: '1+4',
metadata: { language: 'python' },
execution_count: 1
}],
metadata: {
'kernelspec': {
'name': 'python3',
'display_name': 'Python 3'
}
},
nbformat: 4,
nbformat_minor: 2
};
export const sqlNotebookContent: azdata.nb.INotebookContents = {
cells: [{
cell_type: CellTypes.Code,
@@ -52,6 +84,33 @@ export const sqlNotebookContent: azdata.nb.INotebookContents = {
nbformat_minor: 2
};
export const sqlNotebookMultipleCellsContent: azdata.nb.INotebookContents = {
cells: [{
cell_type: CellTypes.Code,
source: 'select 0',
metadata: { language: 'sql' },
execution_count: 1
}, {
cell_type: CellTypes.Code,
source: `WAITFOR DELAY '00:00:02'\nselect 1`,
metadata: { language: 'sql' },
execution_count: 1
}, {
cell_type: CellTypes.Code,
source: 'select 2',
metadata: { language: 'sql' },
execution_count: 1
}],
metadata: {
'kernelspec': {
'name': 'SQL',
'display_name': 'SQL'
}
},
nbformat: 4,
nbformat_minor: 2
};
export const pySpark3KernelMetadata = {
'kernelspec': {
'name': 'pyspark3kernel',