@@ -57,7 +57,7 @@ suite('DataScience - VSCode Notebook - (Execution) (slow)', function () {
57
57
setup ( deleteAllCellsAndWait ) ;
58
58
suiteTeardown ( ( ) => closeNotebooksAndCleanUpAfterTests ( disposables ) ) ;
59
59
test ( 'Execute cell using VSCode Kernel' , async ( ) => {
60
- await insertPythonCellAndWait ( 'print("Hello World")' , 0 ) ;
60
+ await insertPythonCellAndWait ( 'print("Hello World")' ) ;
61
61
const cell = vscodeNotebook . activeNotebookEditor ?. document . cells ! [ 0 ] ! ;
62
62
63
63
await executeCell ( cell ) ;
@@ -70,7 +70,7 @@ suite('DataScience - VSCode Notebook - (Execution) (slow)', function () {
70
70
) ;
71
71
} ) ;
72
72
test ( 'Executed events are triggered' , async ( ) => {
73
- await insertPythonCellAndWait ( 'print("Hello World")' , 0 ) ;
73
+ await insertPythonCellAndWait ( 'print("Hello World")' ) ;
74
74
const cell = vscodeNotebook . activeNotebookEditor ?. document . cells ! [ 0 ] ! ;
75
75
76
76
const executed = createEventHandler ( editorProvider . activeEditor ! , 'executed' , disposables ) ;
@@ -88,7 +88,7 @@ suite('DataScience - VSCode Notebook - (Execution) (slow)', function () {
88
88
await codeExecuted . assertFired ( 1_000 ) ;
89
89
} ) ;
90
90
test ( 'Empty cell will not get executed' , async ( ) => {
91
- await insertPythonCellAndWait ( '' , 0 ) ;
91
+ await insertPythonCellAndWait ( '' ) ;
92
92
const cell = vscodeNotebook . activeNotebookEditor ?. document . cells ! [ 0 ] ! ;
93
93
await executeCell ( cell ) ;
94
94
@@ -97,8 +97,8 @@ suite('DataScience - VSCode Notebook - (Execution) (slow)', function () {
97
97
assert . isUndefined ( cell ?. metadata . runState ) ;
98
98
} ) ;
99
99
test ( 'Empty cells will not get executed when running whole document' , async ( ) => {
100
- await insertPythonCellAndWait ( '' , 0 ) ;
101
- await insertPythonCellAndWait ( 'print("Hello World")' , 1 ) ;
100
+ await insertPythonCellAndWait ( '' ) ;
101
+ await insertPythonCellAndWait ( 'print("Hello World")' ) ;
102
102
const cells = vscodeNotebook . activeNotebookEditor ?. document . cells ! ;
103
103
104
104
await executeActiveDocument ( ) ;
@@ -112,7 +112,7 @@ suite('DataScience - VSCode Notebook - (Execution) (slow)', function () {
112
112
assert . isUndefined ( cells [ 0 ] . metadata . runState ) ;
113
113
} ) ;
114
114
test ( 'Execute cell should mark a notebook as being dirty' , async ( ) => {
115
- await insertPythonCellAndWait ( 'print("Hello World")' , 0 ) ;
115
+ await insertPythonCellAndWait ( 'print("Hello World")' ) ;
116
116
const contentProvider = api . serviceContainer . get < INotebookContentProvider > ( INotebookContentProvider ) ;
117
117
const cell = vscodeNotebook . activeNotebookEditor ?. document . cells ! [ 0 ] ! ;
118
118
const changedEvent = createEventHandler ( contentProvider , 'onDidChangeNotebook' , disposables ) ;
@@ -128,7 +128,7 @@ suite('DataScience - VSCode Notebook - (Execution) (slow)', function () {
128
128
assert . ok ( changedEvent . fired , 'Notebook should be dirty after executing a cell' ) ;
129
129
} ) ;
130
130
test ( 'Verify Cell output, execution count and status' , async ( ) => {
131
- await insertPythonCellAndWait ( 'print("Hello World")' , 0 ) ;
131
+ await insertPythonCellAndWait ( 'print("Hello World")' ) ;
132
132
const cell = vscodeNotebook . activeNotebookEditor ?. document . cells ! [ 0 ] ! ;
133
133
134
134
await executeActiveDocument ( ) ;
@@ -147,8 +147,8 @@ suite('DataScience - VSCode Notebook - (Execution) (slow)', function () {
147
147
assert . ok ( cell . metadata . executionOrder , 'Execution count should be > 0' ) ;
148
148
} ) ;
149
149
test ( 'Verify multiple cells get executed' , async ( ) => {
150
- await insertPythonCellAndWait ( 'print("Foo Bar")' , 0 ) ;
151
- await insertPythonCellAndWait ( 'print("Hello World")' , 1 ) ;
150
+ await insertPythonCellAndWait ( 'print("Foo Bar")' ) ;
151
+ await insertPythonCellAndWait ( 'print("Hello World")' ) ;
152
152
const cells = vscodeNotebook . activeNotebookEditor ?. document . cells ! ;
153
153
154
154
await executeActiveDocument ( ) ;
@@ -163,14 +163,14 @@ suite('DataScience - VSCode Notebook - (Execution) (slow)', function () {
163
163
164
164
// Verify output.
165
165
assertHasTextOutputInVSCode ( cells [ 0 ] , 'Foo Bar' , 0 ) ;
166
- assertHasTextOutputInVSCode ( cells [ 1 ] , 'Hello World' , 0 ) ;
166
+ assertHasTextOutputInVSCode ( cells [ 1 ] , 'Hello World' , 1 ) ;
167
167
168
168
// Verify execution count.
169
169
assert . ok ( cells [ 0 ] . metadata . executionOrder , 'Execution count should be > 0' ) ;
170
170
assert . equal ( cells [ 1 ] . metadata . executionOrder ! - 1 , cells [ 0 ] . metadata . executionOrder ! ) ;
171
171
} ) ;
172
172
test ( 'Verify metadata for successfully executed cell' , async ( ) => {
173
- await insertPythonCellAndWait ( 'print("Foo Bar")' , 0 ) ;
173
+ await insertPythonCellAndWait ( 'print("Foo Bar")' ) ;
174
174
const cell = vscodeNotebook . activeNotebookEditor ?. document . cells ! [ 0 ] ! ;
175
175
176
176
await executeActiveDocument ( ) ;
@@ -189,7 +189,7 @@ suite('DataScience - VSCode Notebook - (Execution) (slow)', function () {
189
189
assert . equal ( cell . metadata . statusMessage , '' , 'Incorrect Status message' ) ;
190
190
} ) ;
191
191
test ( 'Verify output & metadata for executed cell with errors' , async ( ) => {
192
- await insertPythonCellAndWait ( 'print(abcd)' , 0 ) ;
192
+ await insertPythonCellAndWait ( 'print(abcd)' ) ;
193
193
const cell = vscodeNotebook . activeNotebookEditor ?. document . cells ! [ 0 ] ! ;
194
194
195
195
await executeActiveDocument ( ) ;
@@ -215,9 +215,9 @@ suite('DataScience - VSCode Notebook - (Execution) (slow)', function () {
215
215
assert . include ( cell . metadata . statusMessage ! , 'abcd' , 'Must contain error message' ) ;
216
216
} ) ;
217
217
test ( 'Updating display data' , async ( ) => {
218
- await insertPythonCellAndWait ( 'from IPython.display import Markdown\n' , 0 ) ;
219
- await insertPythonCellAndWait ( 'dh = display(display_id=True)\n' , 1 ) ;
220
- await insertPythonCellAndWait ( 'dh.update(Markdown("foo"))\n' , 2 ) ;
218
+ await insertPythonCellAndWait ( 'from IPython.display import Markdown\n' ) ;
219
+ await insertPythonCellAndWait ( 'dh = display(display_id=True)\n' ) ;
220
+ await insertPythonCellAndWait ( 'dh.update(Markdown("foo"))\n' ) ;
221
221
const displayCell = vscodeNotebook . activeNotebookEditor ?. document . cells ! [ 1 ] ! ;
222
222
const updateCell = vscodeNotebook . activeNotebookEditor ?. document . cells ! [ 2 ] ! ;
223
223
@@ -252,8 +252,7 @@ suite('DataScience - VSCode Notebook - (Execution) (slow)', function () {
252
252
time.sleep(0.1)
253
253
print(i)
254
254
255
- print("End")` ,
256
- 0
255
+ print("End")`
257
256
) ;
258
257
const cell = vscodeNotebook . activeNotebookEditor ?. document . cells ! [ 0 ] ! ;
259
258
0 commit comments