@@ -280,7 +280,6 @@ suite('Jupyter Execution', async () => {
280280 } ) ;
281281
282282 teardown ( ( ) => {
283- reset ( fileSystem ) ;
284283 return cleanupDisposables ( ) ;
285284 } ) ;
286285
@@ -440,7 +439,7 @@ suite('Jupyter Execution', async () => {
440439 . returns ( ( ) => result ) ;
441440 }
442441
443- function setupWorkingPythonService ( service : TypeMoq . IMock < IPythonExecutionService > , notebookStdErr ?: string [ ] , runInDocker ?: boolean ) {
442+ function setupWorkingPythonService ( service : TypeMoq . IMock < IPythonExecutionService > , notebookStdErr ?: string [ ] ) {
444443 setupPythonService ( service , 'ipykernel' , [ '--version' ] , Promise . resolve ( { stdout : '1.1.1.1' } ) ) ;
445444 setupPythonService ( service , 'jupyter' , [ 'nbconvert' , '--version' ] , Promise . resolve ( { stdout : '1.1.1.1' } ) ) ;
446445 setupPythonService ( service , 'jupyter' , [ 'notebook' , '--version' ] , Promise . resolve ( { stdout : '1.1.1.1' } ) ) ;
@@ -463,8 +462,7 @@ suite('Jupyter Execution', async () => {
463462 const getServerInfoPath = path . join ( EXTENSION_ROOT_DIR , 'pythonFiles' , 'datascience' , 'getServerInfo.py' ) ;
464463 setupPythonService ( service , undefined , [ getServerInfoPath ] , Promise . resolve ( { stdout : 'failure to get server infos' } ) ) ;
465464 setupPythonServiceExecObservable ( service , 'jupyter' , [ 'kernelspec' , 'list' ] , [ ] , [ ] ) ;
466- const dockerArgs = runInDocker ? [ '--ip' , '127.0.0.1' ] : [ ] ;
467- setupPythonServiceExecObservable ( service , 'jupyter' , [ 'notebook' , '--no-browser' , / - - n o t e b o o k - d i r = .* / , / - - c o n f i g = .* / , '--NotebookApp.iopub_data_rate_limit=10000000000.0' , ...dockerArgs ] , [ ] , notebookStdErr ? notebookStdErr : [ 'http://localhost:8888/?token=198' ] ) ;
465+ setupPythonServiceExecObservable ( service , 'jupyter' , [ 'notebook' , '--no-browser' , / - - n o t e b o o k - d i r = .* / , / - - c o n f i g = .* / , '--NotebookApp.iopub_data_rate_limit=10000000000.0' ] , [ ] , notebookStdErr ? notebookStdErr : [ 'http://localhost:8888/?token=198' ] ) ;
468466 }
469467
470468 function setupMissingKernelPythonService ( service : TypeMoq . IMock < IPythonExecutionService > , notebookStdErr ?: string [ ] ) {
@@ -529,9 +527,6 @@ suite('Jupyter Execution', async () => {
529527 }
530528
531529 function createExecution ( activeInterpreter : PythonInterpreter , notebookStdErr ?: string [ ] , skipSearch ?: boolean ) : JupyterExecutionFactory {
532- return createExecutionAndReturnProcessService ( activeInterpreter , notebookStdErr , skipSearch ) . jupyterExecutionFactory ;
533- }
534- function createExecutionAndReturnProcessService ( activeInterpreter : PythonInterpreter , notebookStdErr ?: string [ ] , skipSearch ?: boolean , runInDocker ?: boolean ) : { workingPythonExecutionService : TypeMoq . IMock < IPythonExecutionService > ; jupyterExecutionFactory : JupyterExecutionFactory } {
535530 // Setup defaults
536531 when ( interpreterService . onDidChangeInterpreter ) . thenReturn ( dummyEvent . event ) ;
537532 when ( interpreterService . getActiveInterpreter ( ) ) . thenResolve ( activeInterpreter ) ;
@@ -540,12 +535,10 @@ suite('Jupyter Execution', async () => {
540535 when ( interpreterService . getInterpreterDetails ( match ( '/foo/baz/python.exe' ) ) ) . thenResolve ( missingKernelPython ) ;
541536 when ( interpreterService . getInterpreterDetails ( match ( '/bar/baz/python.exe' ) ) ) . thenResolve ( missingNotebookPython ) ;
542537 when ( interpreterService . getInterpreterDetails ( argThat ( o => ! o . includes || ! o . includes ( 'python' ) ) ) ) . thenReject ( 'Unknown interpreter' ) ;
543- if ( runInDocker ) {
544- when ( fileSystem . readFile ( '/proc/self/cgroup' ) ) . thenResolve ( 'hello docker world' ) ;
545- }
538+
546539 // Create our working python and process service.
547540 const workingService = createTypeMoq < IPythonExecutionService > ( 'working' ) ;
548- setupWorkingPythonService ( workingService , notebookStdErr , runInDocker ) ;
541+ setupWorkingPythonService ( workingService , notebookStdErr ) ;
549542 const missingKernelService = createTypeMoq < IPythonExecutionService > ( 'missingKernel' ) ;
550543 setupMissingKernelPythonService ( missingKernelService , notebookStdErr ) ;
551544 const missingNotebookService = createTypeMoq < IPythonExecutionService > ( 'missingNotebook' ) ;
@@ -692,19 +685,6 @@ suite('Jupyter Execution', async () => {
692685 await assert . isFulfilled ( execution . connectToNotebookServer ( ) , 'Should be able to start a server' ) ;
693686 } ) . timeout ( 10000 ) ;
694687
695- test ( 'Includes correct args for running in docker' , async ( ) => {
696- const { workingPythonExecutionService, jupyterExecutionFactory} = createExecutionAndReturnProcessService ( workingPython , undefined , undefined , true ) ;
697- when ( executionFactory . createDaemon ( deepEqual ( { daemonModule : PythonDaemonModule , pythonPath : workingPython . path } ) ) ) . thenResolve ( workingPythonExecutionService . object ) ;
698-
699- await assert . eventually . equal ( jupyterExecutionFactory . isNotebookSupported ( ) , true , 'Notebook not supported' ) ;
700- await assert . eventually . equal ( jupyterExecutionFactory . isImportSupported ( ) , true , 'Import not supported' ) ;
701- await assert . eventually . equal ( jupyterExecutionFactory . isKernelSpecSupported ( ) , true , 'Kernel Spec not supported' ) ;
702- await assert . eventually . equal ( jupyterExecutionFactory . isKernelCreateSupported ( ) , true , 'Kernel Create not supported' ) ;
703- const usableInterpreter = await jupyterExecutionFactory . getUsableJupyterPython ( ) ;
704- assert . isOk ( usableInterpreter , 'Usable interpreter not found' ) ;
705- await assert . isFulfilled ( jupyterExecutionFactory . connectToNotebookServer ( ) , 'Should be able to start a server' ) ;
706- } ) . timeout ( 10000 ) ;
707-
708688 test ( 'Failing notebook throws exception' , async ( ) => {
709689 const execution = createExecution ( missingNotebookPython ) ;
710690 when ( interpreterService . getInterpreters ( ) ) . thenResolve ( [ missingNotebookPython ] ) ;
0 commit comments