diff --git a/.eslintrc.js b/.eslintrc.js index 8aa19a3d88a..029ee837903 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -792,7 +792,7 @@ module.exports = { basePath: './src', zones: [ { - target: './client/**/*[!unit.].ts', + target: './client', from: './test', message: 'Importing test modules from ./src/test into extension code in .src/client, is not allowed.' } diff --git a/.vscode/launch.json b/.vscode/launch.json index 268b636286a..f07531d6529 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -172,7 +172,7 @@ "stopOnEntry": false, "sourceMaps": true, "args": [ - "./out/**/*.unit.test.js", + "./out/test/**/*.unit.test.js", "--require=out/test/unittests.js", "--ui=tdd", "--recursive", diff --git a/.vscode/settings.json b/.vscode/settings.json index b6a718ebeab..910d21d58d6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -57,7 +57,7 @@ "--max-line-length=88" ], "typescript.preferences.importModuleSpecifier": "relative", - "mochaExplorer.files": "./out/**/*.unit.test.js", + "mochaExplorer.files": "./out/test/**/*.unit.test.js", "mochaExplorer.require": ["ts-node/register", "./out/test/unittests.js"], "mochaExplorer.ui": "tdd", "mochaExplorer.nodeArgv": ["--enable-source-maps"] diff --git a/build/.mocha.unittests.js.json b/build/.mocha.unittests.js.json index acac53f610f..a0bc134c7dc 100644 --- a/build/.mocha.unittests.js.json +++ b/build/.mocha.unittests.js.json @@ -1,5 +1,5 @@ { - "spec": "./out/**/*.unit.test.js", + "spec": "./out/test/**/*.unit.test.js", "require": ["source-map-support/register", "out/test/unittests.js"], "reporter": "mocha-multi-reporters", "reporter-option": "configFile=build/.mocha-multi-reporters.config", diff --git a/build/.mocha.unittests.json b/build/.mocha.unittests.json index 6696565b2ff..b4dcc393c7e 100644 --- a/build/.mocha.unittests.json +++ b/build/.mocha.unittests.json @@ -1,5 +1,5 @@ { - "spec": "./out/**/*.unit.test.js", + "spec": "./out/test/**/*.unit.test.js", "require": ["out/test/unittests.js"], "reporter": "mocha-multi-reporters", "reporter-option": "configFile=build/.mocha-multi-reporters.config", diff --git a/src/client/common/helpers.unit.test.ts b/src/client/common/helpers.unit.test.ts new file mode 100644 index 00000000000..ebb3eb97648 --- /dev/null +++ b/src/client/common/helpers.unit.test.ts @@ -0,0 +1,23 @@ +import * as assert from 'assert'; + +// You can import and use all API from the 'vscode' module +// as well as import your extension to test it +import { isNotInstalledError } from './helpers'; + +// Defines a Mocha test suite to group tests of similar kind together +suite('helpers', () => { + test('isNotInstalledError', (done) => { + const error = new Error('something is not installed'); + assert.equal(isNotInstalledError(error), false, 'Standard error'); + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (error as any).code = 'ENOENT'; + assert.equal(isNotInstalledError(error), true, 'ENOENT error code not detected'); + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (error as any).code = 127; + assert.equal(isNotInstalledError(error), true, '127 error code not detected'); + + done(); + }); +}); diff --git a/src/client/activation/migrateDataScienceSettingsService.unit.test.ts b/src/test/activation/migrateDataScienceSettingsService.unit.test.ts similarity index 91% rename from src/client/activation/migrateDataScienceSettingsService.unit.test.ts rename to src/test/activation/migrateDataScienceSettingsService.unit.test.ts index fb10a8dfefd..429e6768b0e 100644 --- a/src/client/activation/migrateDataScienceSettingsService.unit.test.ts +++ b/src/test/activation/migrateDataScienceSettingsService.unit.test.ts @@ -1,14 +1,14 @@ import { assert } from 'chai'; import { anyString, anything, instance, mock, when } from 'ts-mockito'; -import { MigrateDataScienceSettingsService } from './migrateDataScienceSettingsService'; -import { ApplicationEnvironment } from '../common/application/applicationEnvironment'; -import { IApplicationEnvironment, IWorkspaceService } from '../common/application/types'; -import { WorkspaceService } from '../common/application/workspace'; -import { PersistentStateFactory, PersistentState } from '../common/persistentState'; -import { IPersistentStateFactory } from '../common/types'; -import { JupyterServerUriStorage } from '../datascience/jupyter/serverUriStorage'; -import { IJupyterServerUriStorage } from '../datascience/types'; -import { MockFileSystem } from '../../test/datascience/mockFileSystem'; +import { MigrateDataScienceSettingsService } from '../../client/activation/migrateDataScienceSettingsService'; +import { ApplicationEnvironment } from '../../client/common/application/applicationEnvironment'; +import { IApplicationEnvironment, IWorkspaceService } from '../../client/common/application/types'; +import { WorkspaceService } from '../../client/common/application/workspace'; +import { PersistentStateFactory, PersistentState } from '../../client/common/persistentState'; +import { IPersistentStateFactory } from '../../client/common/types'; +import { JupyterServerUriStorage } from '../../client/datascience/jupyter/serverUriStorage'; +import { IJupyterServerUriStorage } from '../../client/datascience/types'; +import { MockFileSystem } from '../datascience/mockFileSystem'; suite('Migrate data science settings', () => { const fs = new MockFileSystem(); diff --git a/src/client/common/application/commands/reloadCommand.unit.test.ts b/src/test/common/application/commands/reloadCommand.unit.test.ts similarity index 85% rename from src/client/common/application/commands/reloadCommand.unit.test.ts rename to src/test/common/application/commands/reloadCommand.unit.test.ts index bab4f797bba..5f5a4fe32f5 100644 --- a/src/client/common/application/commands/reloadCommand.unit.test.ts +++ b/src/test/common/application/commands/reloadCommand.unit.test.ts @@ -4,11 +4,11 @@ 'use strict'; import { anything, capture, instance, mock, verify, when } from 'ts-mockito'; -import { ApplicationShell } from '../applicationShell'; -import { CommandManager } from '../commandManager'; -import { ReloadVSCodeCommandHandler } from './reloadCommand'; -import { IApplicationShell, ICommandManager } from '../types'; -import { Common } from '../../utils/localize'; +import { ApplicationShell } from '../../../../client/common/application/applicationShell'; +import { CommandManager } from '../../../../client/common/application/commandManager'; +import { ReloadVSCodeCommandHandler } from '../../../../client/common/application/commands/reloadCommand'; +import { IApplicationShell, ICommandManager } from '../../../../client/common/application/types'; +import { Common } from '../../../../client/common/utils/localize'; // Defines a Mocha test suite to group tests of similar kind together suite('Common Commands ReloadCommand', () => { diff --git a/src/client/common/configuration/service.unit.test.ts b/src/test/common/configuration/service.unit.test.ts similarity index 92% rename from src/client/common/configuration/service.unit.test.ts rename to src/test/common/configuration/service.unit.test.ts index b0514159983..ba2faaa0860 100644 --- a/src/client/common/configuration/service.unit.test.ts +++ b/src/test/common/configuration/service.unit.test.ts @@ -6,11 +6,11 @@ import { expect } from 'chai'; import * as TypeMoq from 'typemoq'; import { ConfigurationTarget, Uri, WorkspaceConfiguration } from 'vscode'; -import { IWorkspaceService } from '../application/types'; -import { JupyterSettings } from '../configSettings'; -import { ConfigurationService } from './service'; -import { IExperimentService } from '../types'; -import { IServiceContainer } from '../../ioc/types'; +import { IWorkspaceService } from '../../../client/common/application/types'; +import { JupyterSettings } from '../../../client/common/configSettings'; +import { ConfigurationService } from '../../../client/common/configuration/service'; +import { IExperimentService } from '../../../client/common/types'; +import { IServiceContainer } from '../../../client/ioc/types'; suite('Configuration Service', () => { const resource = Uri.parse('a'); diff --git a/src/client/common/crypto.unit.test.ts b/src/test/common/crypto.unit.test.ts similarity index 98% rename from src/client/common/crypto.unit.test.ts rename to src/test/common/crypto.unit.test.ts index ba4a2a8e853..d8d79f54025 100644 --- a/src/client/common/crypto.unit.test.ts +++ b/src/test/common/crypto.unit.test.ts @@ -7,7 +7,7 @@ import { assert, expect } from 'chai'; import * as fs from 'fs-extra'; import * as path from 'path'; import { CryptoUtils } from '../../client/common/crypto'; -import { EXTENSION_ROOT_DIR_FOR_TESTS } from '../../test/constants'; +import { EXTENSION_ROOT_DIR_FOR_TESTS } from '../constants'; const RANDOM_WORDS = path.join(EXTENSION_ROOT_DIR_FOR_TESTS, 'src', 'test', 'common', 'randomWords.txt'); diff --git a/src/client/common/experiments/service.unit.test.ts b/src/test/common/experiments/service.unit.test.ts similarity index 93% rename from src/client/common/experiments/service.unit.test.ts rename to src/test/common/experiments/service.unit.test.ts index 385fd494335..efa1dca3c91 100644 --- a/src/client/common/experiments/service.unit.test.ts +++ b/src/test/common/experiments/service.unit.test.ts @@ -7,17 +7,17 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; import { anything, instance, mock, when } from 'ts-mockito'; import * as tasClient from 'vscode-tas-client'; -import { ApplicationEnvironment } from '../application/applicationEnvironment'; -import { Channel, IApplicationEnvironment, IWorkspaceService } from '../application/types'; -import { WorkspaceService } from '../application/workspace'; -import { ConfigurationService } from '../configuration/service'; -import { ExperimentService } from './service'; -import { IConfigurationService } from '../types'; -import * as Telemetry from '../../telemetry'; -import { EventName } from '../../telemetry/constants'; -import { JVSC_EXTENSION_ID_FOR_TESTS } from '../../../test/constants'; -import { MockOutputChannel } from '../../../test/mockClasses'; -import { MockMemento } from '../../../test/mocks/mementos'; +import { ApplicationEnvironment } from '../../../client/common/application/applicationEnvironment'; +import { Channel, IApplicationEnvironment, IWorkspaceService } from '../../../client/common/application/types'; +import { WorkspaceService } from '../../../client/common/application/workspace'; +import { ConfigurationService } from '../../../client/common/configuration/service'; +import { ExperimentService } from '../../../client/common/experiments/service'; +import { IConfigurationService } from '../../../client/common/types'; +import * as Telemetry from '../../../client/telemetry'; +import { EventName } from '../../../client/telemetry/constants'; +import { JVSC_EXTENSION_ID_FOR_TESTS } from '../../constants'; +import { MockOutputChannel } from '../../mockClasses'; +import { MockMemento } from '../../mocks/mementos'; suite('Experimentation service', () => { const extensionVersion = '1.2.3'; diff --git a/src/client/common/experiments/telemetry.unit.test.ts b/src/test/common/experiments/telemetry.unit.test.ts similarity index 93% rename from src/client/common/experiments/telemetry.unit.test.ts rename to src/test/common/experiments/telemetry.unit.test.ts index f947d986815..43f362b0ff8 100644 --- a/src/client/common/experiments/telemetry.unit.test.ts +++ b/src/test/common/experiments/telemetry.unit.test.ts @@ -5,8 +5,8 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; -import { ExperimentationTelemetry } from './telemetry'; -import * as Telemetry from '../../telemetry'; +import { ExperimentationTelemetry } from '../../../client/common/experiments/telemetry'; +import * as Telemetry from '../../../client/telemetry'; suite('Experimentation telemetry', () => { const event = 'SomeEventName'; diff --git a/src/client/common/extensions.unit.test.ts b/src/test/common/extensions.unit.test.ts similarity index 99% rename from src/client/common/extensions.unit.test.ts rename to src/test/common/extensions.unit.test.ts index e9f882329e3..adbf2af873c 100644 --- a/src/client/common/extensions.unit.test.ts +++ b/src/test/common/extensions.unit.test.ts @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import './extensions'; +import '../../client/common/extensions'; // Defines a Mocha test suite to group tests of similar kind together suite('String Extensions', () => { diff --git a/src/client/common/net/fileDownloader.unit.test.ts b/src/test/common/net/fileDownloader.unit.test.ts similarity index 93% rename from src/client/common/net/fileDownloader.unit.test.ts rename to src/test/common/net/fileDownloader.unit.test.ts index 25aee4e2943..5119cb38b49 100644 --- a/src/client/common/net/fileDownloader.unit.test.ts +++ b/src/test/common/net/fileDownloader.unit.test.ts @@ -14,18 +14,18 @@ import * as sinon from 'sinon'; import { Readable } from 'stream'; import { anything, instance, mock, verify, when } from 'ts-mockito'; import { Progress } from 'vscode'; -import { ApplicationShell } from '../application/applicationShell'; -import { IApplicationShell } from '../application/types'; -import { FileDownloader } from './fileDownloader'; -import { HttpClient } from './httpClient'; -import { FileSystem } from '../platform/fileSystem'; -import { PlatformService } from '../platform/platformService'; -import { IFileSystem } from '../platform/types'; -import { IHttpClient } from '../types'; -import { Http } from '../utils/localize'; -import { EXTENSION_ROOT_DIR } from '../../constants'; -import { noop } from '../../../test/core'; -import { MockOutputChannel } from '../../../test/mockClasses'; +import { ApplicationShell } from '../../../client/common/application/applicationShell'; +import { IApplicationShell } from '../../../client/common/application/types'; +import { FileDownloader } from '../../../client/common/net/fileDownloader'; +import { HttpClient } from '../../../client/common/net/httpClient'; +import { FileSystem } from '../../../client/common/platform/fileSystem'; +import { PlatformService } from '../../../client/common/platform/platformService'; +import { IFileSystem } from '../../../client/common/platform/types'; +import { IHttpClient } from '../../../client/common/types'; +import { Http } from '../../../client/common/utils/localize'; +import { EXTENSION_ROOT_DIR } from '../../../client/constants'; +import { noop } from '../../core'; +import { MockOutputChannel } from '../../mockClasses'; const requestProgress = require('request-progress'); const request = require('request'); diff --git a/src/client/common/net/httpClient.unit.test.ts b/src/test/common/net/httpClient.unit.test.ts similarity index 100% rename from src/client/common/net/httpClient.unit.test.ts rename to src/test/common/net/httpClient.unit.test.ts diff --git a/src/client/common/platform/errors.unit.test.ts b/src/test/common/platform/errors.unit.test.ts similarity index 97% rename from src/client/common/platform/errors.unit.test.ts rename to src/test/common/platform/errors.unit.test.ts index 1212918ad91..cc7cd5b2c90 100644 --- a/src/client/common/platform/errors.unit.test.ts +++ b/src/test/common/platform/errors.unit.test.ts @@ -11,8 +11,8 @@ import { isFileNotFoundError, isNoPermissionsError, isNotDirError -} from './errors'; -import { SystemError } from '../../../test/common/platform/utils'; +} from '../../../client/common/platform/errors'; +import { SystemError } from './utils'; suite('FileSystem - errors', () => { const filename = 'spam'; diff --git a/src/client/common/platform/filesystem.unit.test.ts b/src/test/common/platform/filesystem.unit.test.ts similarity index 100% rename from src/client/common/platform/filesystem.unit.test.ts rename to src/test/common/platform/filesystem.unit.test.ts diff --git a/src/client/common/platform/fs-paths.unit.test.ts b/src/test/common/platform/fs-paths.unit.test.ts similarity index 95% rename from src/client/common/platform/fs-paths.unit.test.ts rename to src/test/common/platform/fs-paths.unit.test.ts index c14f9c82873..187db527263 100644 --- a/src/client/common/platform/fs-paths.unit.test.ts +++ b/src/test/common/platform/fs-paths.unit.test.ts @@ -6,9 +6,9 @@ import { expect } from 'chai'; import * as path from 'path'; import * as TypeMoq from 'typemoq'; -import { FileSystemPathUtils } from './fs-paths'; -import { getNamesAndValues } from '../../../test/utils/enum'; -import { OSType } from '../utils/platform'; +import { FileSystemPathUtils } from '../../../client/common/platform/fs-paths'; +import { getNamesAndValues } from '../../utils/enum'; +import { OSType } from '../../../client/common/utils/platform'; interface IUtilsDeps { // executables diff --git a/src/client/common/platform/fs-temp.unit.test.ts b/src/test/common/platform/fs-temp.unit.test.ts similarity index 100% rename from src/client/common/platform/fs-temp.unit.test.ts rename to src/test/common/platform/fs-temp.unit.test.ts diff --git a/src/client/common/process/logger.unit.test.ts b/src/test/common/process/logger.unit.test.ts similarity index 94% rename from src/client/common/process/logger.unit.test.ts rename to src/test/common/process/logger.unit.test.ts index 0ebd33f02d7..79c04a68577 100644 --- a/src/client/common/process/logger.unit.test.ts +++ b/src/test/common/process/logger.unit.test.ts @@ -9,11 +9,11 @@ import * as TypeMoq from 'typemoq'; // eslint-disable-next-line @typescript-eslint/no-require-imports import untildify = require('untildify'); -import { PathUtils } from '../platform/pathUtils'; -import { ProcessLogger } from './logger'; -import { IOutputChannel } from '../types'; -import { Logging } from '../utils/localize'; -import { getOSType, OSType } from '../../../test/common'; +import { PathUtils } from '../../../client/common/platform/pathUtils'; +import { ProcessLogger } from '../../../client/common/process/logger'; +import { IOutputChannel } from '../../../client/common/types'; +import { Logging } from '../../../client/common/utils/localize'; +import { getOSType, OSType } from '../../common'; /* eslint-disable */ suite('ProcessLogger suite', () => { diff --git a/src/client/common/process/proc.unit.test.ts b/src/test/common/process/proc.unit.test.ts similarity index 96% rename from src/client/common/process/proc.unit.test.ts rename to src/test/common/process/proc.unit.test.ts index 2648de8fb8c..563eacbaff9 100644 --- a/src/client/common/process/proc.unit.test.ts +++ b/src/test/common/process/proc.unit.test.ts @@ -9,7 +9,7 @@ import { expect } from 'chai'; import { ChildProcess, spawn } from 'child_process'; import { ProcessService } from '../../../client/common/process/proc'; import { createDeferred, Deferred } from '../../../client/common/utils/async'; -import { PYTHON_PATH } from '../../../test/common'; +import { PYTHON_PATH } from '../../common'; interface IProcData { proc: ChildProcess; diff --git a/src/client/common/process/processFactory.unit.test.ts b/src/test/common/process/processFactory.unit.test.ts similarity index 100% rename from src/client/common/process/processFactory.unit.test.ts rename to src/test/common/process/processFactory.unit.test.ts diff --git a/src/client/common/process/pythonDaemonPool.unit.test.ts b/src/test/common/process/pythonDaemonPool.unit.test.ts similarity index 99% rename from src/client/common/process/pythonDaemonPool.unit.test.ts rename to src/test/common/process/pythonDaemonPool.unit.test.ts index 8b1754f00fb..03671fed8dc 100644 --- a/src/client/common/process/pythonDaemonPool.unit.test.ts +++ b/src/test/common/process/pythonDaemonPool.unit.test.ts @@ -20,8 +20,8 @@ import { IProcessLogger, IPythonExecutionService, Output } from '../../../client import { ReadWrite } from '../../../client/common/types'; import { sleep } from '../../../client/common/utils/async'; import { InterpreterInformation, PythonEnvironment } from '../../../client/pythonEnvironments/info'; -import { asyncDump } from '../../../test/common/asyncDump'; -import { noop } from '../../../test/core'; +import { noop } from '../../core'; +import { asyncDump } from '../asyncDump'; use(chaiPromised); /* eslint-disable @typescript-eslint/no-explicit-any, */ diff --git a/src/client/common/process/pythonEnvironment.unit.test.ts b/src/test/common/process/pythonEnvironment.unit.test.ts similarity index 100% rename from src/client/common/process/pythonEnvironment.unit.test.ts rename to src/test/common/process/pythonEnvironment.unit.test.ts diff --git a/src/client/common/process/pythonProcess.unit.test.ts b/src/test/common/process/pythonProcess.unit.test.ts similarity index 99% rename from src/client/common/process/pythonProcess.unit.test.ts rename to src/test/common/process/pythonProcess.unit.test.ts index 22a0010b268..bc2ad020f79 100644 --- a/src/client/common/process/pythonProcess.unit.test.ts +++ b/src/test/common/process/pythonProcess.unit.test.ts @@ -9,7 +9,7 @@ import { createPythonEnv } from '../../../client/common/process/pythonEnvironmen import { createPythonProcessService } from '../../../client/common/process/pythonProcess'; import { IProcessService, StdErrError } from '../../../client/common/process/types'; import { PythonEnvironment } from '../../../client/pythonEnvironments/info'; -import { noop } from '../../../test/core'; +import { noop } from '../../core'; use(chaiAsPromised); diff --git a/src/client/common/process/serviceRegistry.unit.test.ts b/src/test/common/process/serviceRegistry.unit.test.ts similarity index 100% rename from src/client/common/process/serviceRegistry.unit.test.ts rename to src/test/common/process/serviceRegistry.unit.test.ts diff --git a/src/client/common/utils/async.unit.test.ts b/src/test/common/utils/async.unit.test.ts similarity index 99% rename from src/client/common/utils/async.unit.test.ts rename to src/test/common/utils/async.unit.test.ts index 63991ba302c..9202035a625 100644 --- a/src/client/common/utils/async.unit.test.ts +++ b/src/test/common/utils/async.unit.test.ts @@ -4,7 +4,7 @@ 'use strict'; import * as assert from 'assert'; -import { chain, createDeferred, flattenIterator } from './async'; +import { chain, createDeferred, flattenIterator } from '../../../client/common/utils/async'; suite('Deferred', () => { test('Resolve', (done) => { diff --git a/src/client/common/utils/cacheUtils.unit.test.ts b/src/test/common/utils/cacheUtils.unit.test.ts similarity index 100% rename from src/client/common/utils/cacheUtils.unit.test.ts rename to src/test/common/utils/cacheUtils.unit.test.ts diff --git a/src/client/common/utils/decorators.unit.test.ts b/src/test/common/utils/decorators.unit.test.ts similarity index 99% rename from src/client/common/utils/decorators.unit.test.ts rename to src/test/common/utils/decorators.unit.test.ts index 7ed0b0639d4..ddf63078e08 100644 --- a/src/client/common/utils/decorators.unit.test.ts +++ b/src/test/common/utils/decorators.unit.test.ts @@ -7,7 +7,7 @@ import { expect, use } from 'chai'; import * as chaiPromise from 'chai-as-promised'; import { clearCache } from '../../../client/common/utils/cacheUtils'; import { cache, makeDebounceAsyncDecorator, makeDebounceDecorator } from '../../../client/common/utils/decorators'; -import { sleep } from '../../../test/core'; +import { sleep } from '../../core'; use(chaiPromise); /* eslint-disable @typescript-eslint/no-explicit-any, , @typescript-eslint/no-extraneous-class */ diff --git a/src/client/common/utils/localize.functional.test.ts b/src/test/common/utils/localize.functional.test.ts similarity index 100% rename from src/client/common/utils/localize.functional.test.ts rename to src/test/common/utils/localize.functional.test.ts diff --git a/src/client/common/utils/regexp.unit.test.ts b/src/test/common/utils/regexp.unit.test.ts similarity index 100% rename from src/client/common/utils/regexp.unit.test.ts rename to src/test/common/utils/regexp.unit.test.ts diff --git a/src/client/common/utils/text.unit.test.ts b/src/test/common/utils/text.unit.test.ts similarity index 100% rename from src/client/common/utils/text.unit.test.ts rename to src/test/common/utils/text.unit.test.ts diff --git a/src/client/common/variables/environment.unit.test.ts b/src/test/common/variables/envVarsService.unit.test.ts similarity index 99% rename from src/client/common/variables/environment.unit.test.ts rename to src/test/common/variables/envVarsService.unit.test.ts index ee1f11a987b..711a9562d91 100644 --- a/src/client/common/variables/environment.unit.test.ts +++ b/src/test/common/variables/envVarsService.unit.test.ts @@ -9,8 +9,8 @@ import { expect, use } from 'chai'; import * as chaiAsPromised from 'chai-as-promised'; import * as path from 'path'; import * as TypeMoq from 'typemoq'; -import { IFileSystem } from '../platform/types'; -import { EnvironmentVariablesService, parseEnvFile } from './environment'; +import { IFileSystem } from '../../../client/common/platform/types'; +import { EnvironmentVariablesService, parseEnvFile } from '../../../client/common/variables/environment'; use(chaiAsPromised); diff --git a/src/client/datascience/kernel-launcher/kernelEnvVarsService.unit.test.ts b/src/test/common/variables/kernelEnvVarsService.unit.test.ts similarity index 88% rename from src/client/datascience/kernel-launcher/kernelEnvVarsService.unit.test.ts rename to src/test/common/variables/kernelEnvVarsService.unit.test.ts index 23070ea26b4..f3d9128381a 100644 --- a/src/client/datascience/kernel-launcher/kernelEnvVarsService.unit.test.ts +++ b/src/test/common/variables/kernelEnvVarsService.unit.test.ts @@ -9,14 +9,14 @@ import { expect, use } from 'chai'; import * as chaiAsPromised from 'chai-as-promised'; import * as TypeMoq from 'typemoq'; import * as path from 'path'; -import { IFileSystem } from '../../common/platform/types'; -import { EnvironmentVariablesService } from '../../common/variables/environment'; -import { IEnvironmentVariablesProvider } from '../../common/variables/types'; -import { KernelEnvironmentVariablesService } from './kernelEnvVarsService'; -import { IJupyterKernelSpec } from '../types'; -import { IEnvironmentActivationService } from '../../interpreter/activation/types'; -import { IInterpreterService } from '../../interpreter/contracts'; -import { EnvironmentType, PythonEnvironment } from '../../pythonEnvironments/info'; +import { IFileSystem } from '../../../client/common/platform/types'; +import { EnvironmentVariablesService } from '../../../client/common/variables/environment'; +import { IEnvironmentVariablesProvider } from '../../../client/common/variables/types'; +import { KernelEnvironmentVariablesService } from '../../../client/datascience/kernel-launcher/kernelEnvVarsService'; +import { IJupyterKernelSpec } from '../../../client/datascience/types'; +import { IEnvironmentActivationService } from '../../../client/interpreter/activation/types'; +import { IInterpreterService } from '../../../client/interpreter/contracts'; +import { EnvironmentType, PythonEnvironment } from '../../../client/pythonEnvironments/info'; use(chaiAsPromised); diff --git a/src/client/common/variables/serviceRegistry.unit.test.ts b/src/test/common/variables/serviceRegistry.unit.test.ts similarity index 100% rename from src/client/common/variables/serviceRegistry.unit.test.ts rename to src/test/common/variables/serviceRegistry.unit.test.ts diff --git a/src/datascience-ui/common/cellFactory.unit.test.ts b/src/test/datascience/cellFactory.unit.test.ts similarity index 99% rename from src/datascience-ui/common/cellFactory.unit.test.ts rename to src/test/datascience/cellFactory.unit.test.ts index 51939ec69c5..66f1443a41d 100644 --- a/src/datascience-ui/common/cellFactory.unit.test.ts +++ b/src/test/datascience/cellFactory.unit.test.ts @@ -3,7 +3,7 @@ 'use strict'; import { assert } from 'chai'; import { generateCells } from '../../client/datascience/cellFactory'; -import { removeLinesFromFrontAndBack, stripComments } from '.'; +import { removeLinesFromFrontAndBack, stripComments } from '../../datascience-ui/common'; import * as vscode from 'vscode'; /* eslint-disable */ diff --git a/src/datascience-ui/common/cellMatcher.unit.test.ts b/src/test/datascience/cellMatcher.unit.test.ts similarity index 94% rename from src/datascience-ui/common/cellMatcher.unit.test.ts rename to src/test/datascience/cellMatcher.unit.test.ts index 9dd02a4d457..64b822e1c7a 100644 --- a/src/datascience-ui/common/cellMatcher.unit.test.ts +++ b/src/test/datascience/cellMatcher.unit.test.ts @@ -4,7 +4,7 @@ import { assert } from 'chai'; import { IJupyterSettings } from '../../client/common/types'; import { CellMatcher } from '../../client/datascience/cellMatcher'; -import { defaultDataScienceSettings } from '../../test/datascience/helpers'; +import { defaultDataScienceSettings } from './helpers'; suite('DataScience CellMatcher', () => { test('CellMatcher', () => { diff --git a/src/client/datascience/commands/serverSelector.unit.test.ts b/src/test/datascience/commands/serverSelector.unit.test.ts similarity index 81% rename from src/client/datascience/commands/serverSelector.unit.test.ts rename to src/test/datascience/commands/serverSelector.unit.test.ts index 23b4b2a0a7d..8ff432f6cfa 100644 --- a/src/client/datascience/commands/serverSelector.unit.test.ts +++ b/src/test/datascience/commands/serverSelector.unit.test.ts @@ -2,11 +2,11 @@ // Licensed under the MIT License. import { anything, capture, instance, mock, verify } from 'ts-mockito'; import { Uri } from 'vscode'; -import { CommandManager } from '../../common/application/commandManager'; -import { ICommandManager } from '../../common/application/types'; -import { JupyterServerSelectorCommand } from './serverSelector'; -import { Commands } from '../constants'; -import { JupyterServerSelector } from '../jupyter/serverSelector'; +import { CommandManager } from '../../../client/common/application/commandManager'; +import { ICommandManager } from '../../../client/common/application/types'; +import { JupyterServerSelectorCommand } from '../../../client/datascience/commands/serverSelector'; +import { Commands } from '../../../client/datascience/constants'; +import { JupyterServerSelector } from '../../../client/datascience/jupyter/serverSelector'; /* eslint-disable */ suite('DataScience - Server Selector Command', () => { diff --git a/src/datascience-ui/common/index.unit.test.ts b/src/test/datascience/common.unit.test.ts similarity index 94% rename from src/datascience-ui/common/index.unit.test.ts rename to src/test/datascience/common.unit.test.ts index 9ff83b63cd8..e3a1fa16460 100644 --- a/src/datascience-ui/common/index.unit.test.ts +++ b/src/test/datascience/common.unit.test.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. 'use strict'; import { assert } from 'chai'; -import { formatStreamText } from '.'; +import { formatStreamText } from '../../datascience-ui/common'; suite('DataScience Common Tests', () => { test('formatting stream text', async () => { diff --git a/src/client/datascience/data-viewing/dataViewer.unit.test.ts b/src/test/datascience/data-viewing/dataViewer.unit.test.ts similarity index 69% rename from src/client/datascience/data-viewing/dataViewer.unit.test.ts rename to src/test/datascience/data-viewing/dataViewer.unit.test.ts index c90315f6e3b..c88bd9bdddf 100644 --- a/src/client/datascience/data-viewing/dataViewer.unit.test.ts +++ b/src/test/datascience/data-viewing/dataViewer.unit.test.ts @@ -5,20 +5,20 @@ import { anything, instance, mock, verify, when } from 'ts-mockito'; import { ConfigurationChangeEvent, EventEmitter } from 'vscode'; -import { ApplicationShell } from '../../common/application/applicationShell'; -import { IApplicationShell, IWebviewPanelProvider, IWorkspaceService } from '../../common/application/types'; -import { WebviewPanelProvider } from '../../common/application/webviewPanels/webviewPanelProvider'; -import { WorkspaceService } from '../../common/application/workspace'; -import { JupyterSettings } from '../../common/configSettings'; -import { ConfigurationService } from '../../common/configuration/service'; -import { IConfigurationService } from '../../common/types'; -import { CodeCssGenerator } from '../codeCssGenerator'; -import { DataViewer } from './dataViewer'; -import { JupyterVariableDataProvider } from './jupyterVariableDataProvider'; -import { IDataViewer, IDataViewerDataProvider } from './types'; -import { ThemeFinder } from '../themeFinder'; -import { ICodeCssGenerator, IDataScienceErrorHandler, IThemeFinder } from '../types'; -import { MockMemento } from '../../../test/mocks/mementos'; +import { ApplicationShell } from '../../../client/common/application/applicationShell'; +import { IApplicationShell, IWebviewPanelProvider, IWorkspaceService } from '../../../client/common/application/types'; +import { WebviewPanelProvider } from '../../../client/common/application/webviewPanels/webviewPanelProvider'; +import { WorkspaceService } from '../../../client/common/application/workspace'; +import { JupyterSettings } from '../../../client/common/configSettings'; +import { ConfigurationService } from '../../../client/common/configuration/service'; +import { IConfigurationService } from '../../../client/common/types'; +import { CodeCssGenerator } from '../../../client/datascience/codeCssGenerator'; +import { DataViewer } from '../../../client/datascience/data-viewing/dataViewer'; +import { JupyterVariableDataProvider } from '../../../client/datascience/data-viewing/jupyterVariableDataProvider'; +import { IDataViewer, IDataViewerDataProvider } from '../../../client/datascience/data-viewing/types'; +import { ThemeFinder } from '../../../client/datascience/themeFinder'; +import { ICodeCssGenerator, IDataScienceErrorHandler, IThemeFinder } from '../../../client/datascience/types'; +import { MockMemento } from '../../mocks/mementos'; suite('DataScience - DataViewer', () => { let dataViewer: IDataViewer; diff --git a/src/client/datascience/data-viewing/dataViewerDependencyService.unit.test.ts b/src/test/datascience/data-viewing/dataViewerDependencyService.unit.test.ts similarity index 100% rename from src/client/datascience/data-viewing/dataViewerDependencyService.unit.test.ts rename to src/test/datascience/data-viewing/dataViewerDependencyService.unit.test.ts diff --git a/src/client/datascience/datascience.unit.test.ts b/src/test/datascience/datascience.unit.test.ts similarity index 91% rename from src/client/datascience/datascience.unit.test.ts rename to src/test/datascience/datascience.unit.test.ts index 5fd04797092..9e585418f22 100644 --- a/src/client/datascience/datascience.unit.test.ts +++ b/src/test/datascience/datascience.unit.test.ts @@ -6,19 +6,19 @@ import type * as nbformat from '@jupyterlab/nbformat'; import { assert } from 'chai'; import * as sinon from 'sinon'; import { anything, instance, mock, verify, when } from 'ts-mockito'; -import { CommandManager } from '../common/application/commandManager'; -import { DocumentManager } from '../common/application/documentManager'; -import { IDocumentManager, IWorkspaceService } from '../common/application/types'; -import { WorkspaceService } from '../common/application/workspace'; -import { JupyterSettings } from '../common/configSettings'; -import { ConfigurationService } from '../common/configuration/service'; -import { IConfigurationService, IWatchableJupyterSettings } from '../common/types'; -import { CommandRegistry } from './commands/commandRegistry'; -import { pruneCell } from './common'; -import { DataScience } from './datascience'; -import { DataScienceCodeLensProvider } from './editor-integration/codelensprovider'; -import { RawNotebookSupportedService } from './raw-kernel/rawNotebookSupportedService'; -import { IDataScienceCodeLensProvider, IRawNotebookSupportedService } from './types'; +import { CommandManager } from '../../client/common/application/commandManager'; +import { DocumentManager } from '../../client/common/application/documentManager'; +import { IDocumentManager, IWorkspaceService } from '../../client/common/application/types'; +import { WorkspaceService } from '../../client/common/application/workspace'; +import { JupyterSettings } from '../../client/common/configSettings'; +import { ConfigurationService } from '../../client/common/configuration/service'; +import { IConfigurationService, IWatchableJupyterSettings } from '../../client/common/types'; +import { CommandRegistry } from '../../client/datascience/commands/commandRegistry'; +import { pruneCell } from '../../client/datascience/common'; +import { DataScience } from '../../client/datascience/datascience'; +import { DataScienceCodeLensProvider } from '../../client/datascience/editor-integration/codelensprovider'; +import { RawNotebookSupportedService } from '../../client/datascience/raw-kernel/rawNotebookSupportedService'; +import { IDataScienceCodeLensProvider, IRawNotebookSupportedService } from '../../client/datascience/types'; /* eslint-disable */ suite('DataScience Tests', () => { diff --git a/src/client/datascience/debugLocationTracker.unit.test.ts b/src/test/datascience/debugLocationTracker.unit.test.ts similarity index 93% rename from src/client/datascience/debugLocationTracker.unit.test.ts rename to src/test/datascience/debugLocationTracker.unit.test.ts index 5fa78dc5970..055205a5bb3 100644 --- a/src/client/datascience/debugLocationTracker.unit.test.ts +++ b/src/test/datascience/debugLocationTracker.unit.test.ts @@ -5,8 +5,8 @@ import { expect } from 'chai'; import { DebugProtocol } from 'vscode-debugprotocol'; -import { DebugLocationTracker } from './debugLocationTracker'; -import { IDebugLocation } from './types'; +import { DebugLocationTracker } from '../../client/datascience/debugLocationTracker'; +import { IDebugLocation } from '../../client/datascience/types'; suite('Debug Location Tracker', () => { let debugTracker: DebugLocationTracker; diff --git a/src/client/datascience/editor-integration/cellhashprovider.unit.test.ts b/src/test/datascience/editor-integration/cellhashprovider.unit.test.ts similarity index 97% rename from src/client/datascience/editor-integration/cellhashprovider.unit.test.ts rename to src/test/datascience/editor-integration/cellhashprovider.unit.test.ts index 9cabf3f50b1..e3fee26e5e9 100644 --- a/src/client/datascience/editor-integration/cellhashprovider.unit.test.ts +++ b/src/test/datascience/editor-integration/cellhashprovider.unit.test.ts @@ -5,15 +5,15 @@ import { assert } from 'chai'; import * as TypeMoq from 'typemoq'; import { NotebookCell, NotebookCellKind, Position, Range, Uri } from 'vscode'; -import { IDebugService } from '../../common/application/types'; -import { IFileSystem } from '../../common/platform/types'; -import { IConfigurationService, IWatchableJupyterSettings } from '../../common/types'; -import { CellHashProvider } from './cellhashprovider'; -import { IKernel } from '../jupyter/kernels/types'; -import { JupyterNotebookView } from '../notebook/constants'; -import { ICellHashListener, IFileHashes } from '../types'; -import { MockDocument } from '../../../test/datascience/mockDocument'; -import { MockDocumentManager } from '../../../test/datascience/mockDocumentManager'; +import { IDebugService } from '../../../client/common/application/types'; +import { IFileSystem } from '../../../client/common/platform/types'; +import { IConfigurationService, IWatchableJupyterSettings } from '../../../client/common/types'; +import { CellHashProvider } from '../../../client/datascience/editor-integration/cellhashprovider'; +import { IKernel } from '../../../client/datascience/jupyter/kernels/types'; +import { JupyterNotebookView } from '../../../client/datascience/notebook/constants'; +import { ICellHashListener, IFileHashes } from '../../../client/datascience/types'; +import { MockDocument } from '../mockDocument'; +import { MockDocumentManager } from '../mockDocumentManager'; class HashListener implements ICellHashListener { public lastHashes: IFileHashes[] = []; diff --git a/src/client/datascience/editor-integration/codelensprovider.unit.test.ts b/src/test/datascience/editor-integration/codelensprovider.unit.test.ts similarity index 100% rename from src/client/datascience/editor-integration/codelensprovider.unit.test.ts rename to src/test/datascience/editor-integration/codelensprovider.unit.test.ts diff --git a/src/client/datascience/editor-integration/codewatcher.unit.test.ts b/src/test/datascience/editor-integration/codewatcher.unit.test.ts similarity index 99% rename from src/client/datascience/editor-integration/codewatcher.unit.test.ts rename to src/test/datascience/editor-integration/codewatcher.unit.test.ts index 59734e5dea7..ec532519caa 100644 --- a/src/client/datascience/editor-integration/codewatcher.unit.test.ts +++ b/src/test/datascience/editor-integration/codewatcher.unit.test.ts @@ -40,14 +40,14 @@ import { } from '../../../client/datascience/types'; import { IServiceContainer } from '../../../client/ioc/types'; import { ICodeExecutionHelper } from '../../../client/terminals/types'; +import { MockDocumentManager } from '../mockDocumentManager'; +import { MockJupyterSettings } from '../mockJupyterSettings'; +import { MockEditor } from '../mockTextEditor'; +import { createDocument } from './helpers'; import { disposeAllDisposables } from '../../../client/common/helpers'; import { CellHashProviderFactory } from '../../../client/datascience/editor-integration/cellHashProviderFactory'; import { IKernel, IKernelProvider } from '../../../client/datascience/jupyter/kernels/types'; import { InteractiveCellResultError } from '../../../client/datascience/errors/interactiveCellResultError'; -import { createDocument } from '../../../test/datascience/editor-integration/helpers'; -import { MockDocumentManager } from '../../../test/datascience/mockDocumentManager'; -import { MockJupyterSettings } from '../../../test/datascience/mockJupyterSettings'; -import { MockEditor } from '../../../test/datascience/mockTextEditor'; /* eslint-disable @typescript-eslint/no-explicit-any */ diff --git a/src/client/datascience/errors/errorHandler.unit.test.ts b/src/test/datascience/errorHandler.unit.test.ts similarity index 95% rename from src/client/datascience/errors/errorHandler.unit.test.ts rename to src/test/datascience/errorHandler.unit.test.ts index f6279ad6b22..c4a89d942ab 100644 --- a/src/client/datascience/errors/errorHandler.unit.test.ts +++ b/src/test/datascience/errorHandler.unit.test.ts @@ -5,21 +5,21 @@ import * as dedent from 'dedent'; import { anything, instance, mock, verify, when } from 'ts-mockito'; import { Memento, Uri, WorkspaceFolder } from 'vscode'; -import { IApplicationShell, IWorkspaceService } from '../../common/application/types'; -import { getDisplayPath } from '../../common/platform/fs-paths'; -import { Common, DataScience } from '../../common/utils/localize'; -import { IBrowserService, IConfigurationService } from '../../common/types'; -import { DataScienceErrorHandler } from './errorHandler'; -import { JupyterInstallError } from './jupyterInstallError'; -import { JupyterSelfCertsError } from './jupyterSelfCertsError'; -import { KernelDiedError } from './kernelDiedError'; -import { KernelConnectionMetadata } from '../jupyter/kernels/types'; -import { IJupyterInterpreterDependencyManager, IKernelDependencyService } from '../types'; -import { getOSType, OSType } from '../../../test/common'; -import { IServiceContainer } from '../../ioc/types'; -import { JupyterInterpreterService } from '../jupyter/interpreter/jupyterInterpreterService'; -import { JupyterConnectError } from './jupyterConnectError'; -import { PythonEnvironment } from '../../pythonEnvironments/info'; +import { IApplicationShell, IWorkspaceService } from '../../client/common/application/types'; +import { getDisplayPath } from '../../client/common/platform/fs-paths'; +import { Common, DataScience } from '../../client/common/utils/localize'; +import { IBrowserService, IConfigurationService } from '../../client/common/types'; +import { DataScienceErrorHandler } from '../../client/datascience/errors/errorHandler'; +import { JupyterInstallError } from '../../client/datascience/errors/jupyterInstallError'; +import { JupyterSelfCertsError } from '../../client/datascience/errors/jupyterSelfCertsError'; +import { KernelDiedError } from '../../client/datascience/errors/kernelDiedError'; +import { KernelConnectionMetadata } from '../../client/datascience/jupyter/kernels/types'; +import { IJupyterInterpreterDependencyManager, IKernelDependencyService } from '../../client/datascience/types'; +import { getOSType, OSType } from '../common'; +import { IServiceContainer } from '../../client/ioc/types'; +import { JupyterInterpreterService } from '../../client/datascience/jupyter/interpreter/jupyterInterpreterService'; +import { JupyterConnectError } from '../../client/datascience/errors/jupyterConnectError'; +import { PythonEnvironment } from '../../client/pythonEnvironments/info'; suite('DataScience Error Handler Unit Tests', () => { let applicationShell: IApplicationShell; diff --git a/src/client/datascience/execution.unit.test.ts b/src/test/datascience/execution.unit.test.ts similarity index 91% rename from src/client/datascience/execution.unit.test.ts rename to src/test/datascience/execution.unit.test.ts index 2c467f1c656..bfb1f725984 100644 --- a/src/client/datascience/execution.unit.test.ts +++ b/src/test/datascience/execution.unit.test.ts @@ -12,15 +12,15 @@ import { Matcher } from 'ts-mockito/lib/matcher/type/Matcher'; import * as TypeMoq from 'typemoq'; import * as uuid from 'uuid/v4'; import { CancellationTokenSource, ConfigurationChangeEvent, Disposable, EventEmitter, ExtensionMode } from 'vscode'; -import { ApplicationShell } from '../common/application/applicationShell'; -import { IApplicationShell, IWorkspaceService } from '../common/application/types'; -import { WorkspaceService } from '../common/application/workspace'; -import { ConfigurationService } from '../common/configuration/service'; -import { PersistentState, PersistentStateFactory } from '../common/persistentState'; -import { FileSystem } from '../common/platform/fileSystem'; -import { IFileSystem } from '../common/platform/types'; -import { ProcessServiceFactory } from '../common/process/processFactory'; -import { PythonExecutionFactory } from '../common/process/pythonExecutionFactory'; +import { ApplicationShell } from '../../client/common/application/applicationShell'; +import { IApplicationShell, IWorkspaceService } from '../../client/common/application/types'; +import { WorkspaceService } from '../../client/common/application/workspace'; +import { ConfigurationService } from '../../client/common/configuration/service'; +import { PersistentState, PersistentStateFactory } from '../../client/common/persistentState'; +import { FileSystem } from '../../client/common/platform/fileSystem'; +import { IFileSystem } from '../../client/common/platform/types'; +import { ProcessServiceFactory } from '../../client/common/process/processFactory'; +import { PythonExecutionFactory } from '../../client/common/process/pythonExecutionFactory'; import { ExecutionResult, IProcessService, @@ -30,7 +30,7 @@ import { IPythonExecutionService, ObservableExecutionResult, Output -} from '../common/process/types'; +} from '../../client/common/process/types'; import { IAsyncDisposableRegistry, IConfigurationService, @@ -38,30 +38,34 @@ import { IOutputChannel, IPathUtils, Product -} from '../common/types'; -import { EXTENSION_ROOT_DIR } from '../constants'; -import { DisplayOptions } from './displayOptions'; -import { JupyterInterpreterDependencyService } from './jupyter/interpreter/jupyterInterpreterDependencyService'; -import { JupyterInterpreterOldCacheStateStore } from './jupyter/interpreter/jupyterInterpreterOldCacheStateStore'; -import { JupyterInterpreterService } from './jupyter/interpreter/jupyterInterpreterService'; -import { JupyterInterpreterSubCommandExecutionService } from './jupyter/interpreter/jupyterInterpreterSubCommandExecutionService'; -import { getKernelId } from './jupyter/kernels/helpers'; -import { LocalKernelConnectionMetadata } from './jupyter/kernels/types'; -import { HostJupyterExecution } from './jupyter/liveshare/hostJupyterExecution'; -import { NotebookStarter } from './jupyter/notebookStarter'; -import { LocalKernelFinder } from './kernel-launcher/localKernelFinder'; -import { ILocalKernelFinder } from './kernel-launcher/types'; -import { IJupyterKernelSpec, IJupyterSubCommandExecutionService, INotebookServer } from './types'; -import { IEnvironmentActivationService } from '../interpreter/activation/types'; -import { IInterpreterService } from '../interpreter/contracts'; -import { ServiceContainer } from '../ioc/container'; -import { PythonEnvironment } from '../pythonEnvironments/info'; -import { areInterpreterPathsSame } from '../pythonEnvironments/info/interpreter'; -import { getOSType, OSType } from '../../test/common'; -import { noop } from '../../test/core'; -import { MockOutputChannel } from '../../test/mockClasses'; -import { MockJupyterServer } from '../../test/datascience/mockJupyterServer'; -import { MockJupyterSettings } from '../../test/datascience/mockJupyterSettings'; +} from '../../client/common/types'; +import { EXTENSION_ROOT_DIR } from '../../client/constants'; +import { DisplayOptions } from '../../client/datascience/displayOptions'; +import { JupyterInterpreterDependencyService } from '../../client/datascience/jupyter/interpreter/jupyterInterpreterDependencyService'; +import { JupyterInterpreterOldCacheStateStore } from '../../client/datascience/jupyter/interpreter/jupyterInterpreterOldCacheStateStore'; +import { JupyterInterpreterService } from '../../client/datascience/jupyter/interpreter/jupyterInterpreterService'; +import { JupyterInterpreterSubCommandExecutionService } from '../../client/datascience/jupyter/interpreter/jupyterInterpreterSubCommandExecutionService'; +import { getKernelId } from '../../client/datascience/jupyter/kernels/helpers'; +import { LocalKernelConnectionMetadata } from '../../client/datascience/jupyter/kernels/types'; +import { HostJupyterExecution } from '../../client/datascience/jupyter/liveshare/hostJupyterExecution'; +import { NotebookStarter } from '../../client/datascience/jupyter/notebookStarter'; +import { LocalKernelFinder } from '../../client/datascience/kernel-launcher/localKernelFinder'; +import { ILocalKernelFinder } from '../../client/datascience/kernel-launcher/types'; +import { + IJupyterKernelSpec, + IJupyterSubCommandExecutionService, + INotebookServer +} from '../../client/datascience/types'; +import { IEnvironmentActivationService } from '../../client/interpreter/activation/types'; +import { IInterpreterService } from '../../client/interpreter/contracts'; +import { ServiceContainer } from '../../client/ioc/container'; +import { PythonEnvironment } from '../../client/pythonEnvironments/info'; +import { areInterpreterPathsSame } from '../../client/pythonEnvironments/info/interpreter'; +import { getOSType, OSType } from '../common'; +import { noop } from '../core'; +import { MockOutputChannel } from '../mockClasses'; +import { MockJupyterServer } from './mockJupyterServer'; +import { MockJupyterSettings } from './mockJupyterSettings'; /* eslint-disable @typescript-eslint/no-explicit-any, , no-multi-str, */ class DisposableRegistry implements IAsyncDisposableRegistry { diff --git a/src/client/datascience/export/exportFileOpener.unit.test.ts b/src/test/datascience/export/exportFileOpener.unit.test.ts similarity index 87% rename from src/client/datascience/export/exportFileOpener.unit.test.ts rename to src/test/datascience/export/exportFileOpener.unit.test.ts index 443935336eb..af94b96d8bc 100644 --- a/src/client/datascience/export/exportFileOpener.unit.test.ts +++ b/src/test/datascience/export/exportFileOpener.unit.test.ts @@ -5,12 +5,12 @@ import { anything, instance, mock, verify, when } from 'ts-mockito'; import { TextEditor, Uri } from 'vscode'; -import { IApplicationShell, IDocumentManager } from '../../common/application/types'; -import { IFileSystem } from '../../common/platform/types'; -import { IBrowserService, IDisposable } from '../../common/types'; -import { ExportFileOpener } from './exportFileOpener'; -import { ExportFormat } from './types'; -import { ProgressReporter } from '../progress/progressReporter'; +import { IApplicationShell, IDocumentManager } from '../../../client/common/application/types'; +import { IFileSystem } from '../../../client/common/platform/types'; +import { IBrowserService, IDisposable } from '../../../client/common/types'; +import { ExportFileOpener } from '../../../client/datascience/export/exportFileOpener'; +import { ExportFormat } from '../../../client/datascience/export/types'; +import { ProgressReporter } from '../../../client/datascience/progress/progressReporter'; import { getLocString } from '../../../datascience-ui/react-common/locReactSide'; suite('DataScience - Export File Opener', () => { diff --git a/src/client/datascience/extensionRecommendation.unit.test.ts b/src/test/datascience/extensionRecommendation.unit.test.ts similarity index 93% rename from src/client/datascience/extensionRecommendation.unit.test.ts rename to src/test/datascience/extensionRecommendation.unit.test.ts index 2e9d0c73766..b26a7414006 100644 --- a/src/client/datascience/extensionRecommendation.unit.test.ts +++ b/src/test/datascience/extensionRecommendation.unit.test.ts @@ -4,16 +4,16 @@ import type * as nbformat from '@jupyterlab/nbformat'; import { anything, instance, mock, verify, when } from 'ts-mockito'; import { EventEmitter, Memento, NotebookDocument } from 'vscode'; -import { IApplicationShell, ICommandManager, IVSCodeNotebook } from '../common/application/types'; -import { disposeAllDisposables } from '../common/helpers'; -import { IDisposable, IExtensions } from '../common/types'; -import { sleep } from '../common/utils/async'; -import { Common } from '../common/utils/localize'; -import { ExtensionRecommendationService } from './extensionRecommendation'; -import { JupyterNotebookView } from './notebook/constants'; -import { INotebookControllerManager } from './notebook/types'; -import { VSCodeNotebookController } from './notebook/vscodeNotebookController'; -import { IJupyterKernelSpec } from './types'; +import { IApplicationShell, ICommandManager, IVSCodeNotebook } from '../../client/common/application/types'; +import { disposeAllDisposables } from '../../client/common/helpers'; +import { IDisposable, IExtensions } from '../../client/common/types'; +import { sleep } from '../../client/common/utils/async'; +import { Common } from '../../client/common/utils/localize'; +import { ExtensionRecommendationService } from '../../client/datascience/extensionRecommendation'; +import { JupyterNotebookView } from '../../client/datascience/notebook/constants'; +import { INotebookControllerManager } from '../../client/datascience/notebook/types'; +import { VSCodeNotebookController } from '../../client/datascience/notebook/vscodeNotebookController'; +import { IJupyterKernelSpec } from '../../client/datascience/types'; /* eslint-disable @typescript-eslint/no-explicit-any */ suite('DataScience Extension Recommendation', () => { diff --git a/src/client/datascience/interactive-common/notebookProvider.unit.test.ts b/src/test/datascience/interactive-common/notebookProvider.unit.test.ts similarity index 100% rename from src/client/datascience/interactive-common/notebookProvider.unit.test.ts rename to src/test/datascience/interactive-common/notebookProvider.unit.test.ts diff --git a/src/client/datascience/interactive-common/notebookServerProvider.unit.test.ts b/src/test/datascience/interactive-common/notebookServerProvider.unit.test.ts similarity index 85% rename from src/client/datascience/interactive-common/notebookServerProvider.unit.test.ts rename to src/test/datascience/interactive-common/notebookServerProvider.unit.test.ts index cdfb68d66fd..da4df7f0423 100644 --- a/src/client/datascience/interactive-common/notebookServerProvider.unit.test.ts +++ b/src/test/datascience/interactive-common/notebookServerProvider.unit.test.ts @@ -5,15 +5,15 @@ import { SemVer } from 'semver'; import { anything, instance, mock, verify, when } from 'ts-mockito'; import * as typemoq from 'typemoq'; import { CancellationTokenSource, Disposable, EventEmitter } from 'vscode'; -import { disposeAllDisposables } from '../../common/helpers'; -import { IConfigurationService, IWatchableJupyterSettings } from '../../common/types'; -import { DisplayOptions } from '../displayOptions'; -import { NotebookServerProvider } from './notebookServerProvider'; -import { JupyterServerSelector } from '../jupyter/serverSelector'; -import { JupyterServerUriStorage } from '../jupyter/serverUriStorage'; -import { IJupyterExecution, INotebookServer } from '../types'; -import { IInterpreterService } from '../../interpreter/contracts'; -import { PythonEnvironment } from '../../pythonEnvironments/info'; +import { disposeAllDisposables } from '../../../client/common/helpers'; +import { IConfigurationService, IWatchableJupyterSettings } from '../../../client/common/types'; +import { DisplayOptions } from '../../../client/datascience/displayOptions'; +import { NotebookServerProvider } from '../../../client/datascience/interactive-common/notebookServerProvider'; +import { JupyterServerSelector } from '../../../client/datascience/jupyter/serverSelector'; +import { JupyterServerUriStorage } from '../../../client/datascience/jupyter/serverUriStorage'; +import { IJupyterExecution, INotebookServer } from '../../../client/datascience/types'; +import { IInterpreterService } from '../../../client/interpreter/contracts'; +import { PythonEnvironment } from '../../../client/pythonEnvironments/info'; /* eslint-disable @typescript-eslint/no-explicit-any */ function createTypeMoq(tag: string): typemoq.IMock { diff --git a/src/client/datascience/ipywidgets/cdnWidgetScriptSourceProvider.unit.test.ts b/src/test/datascience/ipywidgets/cdnWidgetScriptSourceProvider.unit.test.ts similarity index 92% rename from src/client/datascience/ipywidgets/cdnWidgetScriptSourceProvider.unit.test.ts rename to src/test/datascience/ipywidgets/cdnWidgetScriptSourceProvider.unit.test.ts index 6abda865991..317949964cf 100644 --- a/src/client/datascience/ipywidgets/cdnWidgetScriptSourceProvider.unit.test.ts +++ b/src/test/datascience/ipywidgets/cdnWidgetScriptSourceProvider.unit.test.ts @@ -8,17 +8,17 @@ import * as path from 'path'; import { Readable } from 'stream'; import { anything, instance, mock, when } from 'ts-mockito'; import { Uri } from 'vscode'; -import { JupyterSettings } from '../../common/configSettings'; -import { ConfigurationService } from '../../common/configuration/service'; -import { FileSystem } from '../../common/platform/fileSystem'; -import { IFileSystem } from '../../common/platform/types'; -import { IConfigurationService, WidgetCDNs } from '../../common/types'; -import { noop } from '../../common/utils/misc'; -import { EXTENSION_ROOT_DIR } from '../../constants'; -import { CDNWidgetScriptSourceProvider } from './cdnWidgetScriptSourceProvider'; -import { IPyWidgetScriptSource } from './ipyWidgetScriptSource'; -import { IWidgetScriptSourceProvider } from './types'; -import { ILocalResourceUriConverter } from '../types'; +import { JupyterSettings } from '../../../client/common/configSettings'; +import { ConfigurationService } from '../../../client/common/configuration/service'; +import { FileSystem } from '../../../client/common/platform/fileSystem'; +import { IFileSystem } from '../../../client/common/platform/types'; +import { IConfigurationService, WidgetCDNs } from '../../../client/common/types'; +import { noop } from '../../../client/common/utils/misc'; +import { EXTENSION_ROOT_DIR } from '../../../client/constants'; +import { CDNWidgetScriptSourceProvider } from '../../../client/datascience/ipywidgets/cdnWidgetScriptSourceProvider'; +import { IPyWidgetScriptSource } from '../../../client/datascience/ipywidgets/ipyWidgetScriptSource'; +import { IWidgetScriptSourceProvider } from '../../../client/datascience/ipywidgets/types'; +import { ILocalResourceUriConverter } from '../../../client/datascience/types'; /* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports, , @typescript-eslint/no-explicit-any, , no-console */ const sanitize = require('sanitize-filename'); diff --git a/src/client/datascience/ipywidgets/incompatibleWidgetHandler.unit.test.ts b/src/test/datascience/ipywidgets/incompatibleWidgetHandler.unit.test.ts similarity index 100% rename from src/client/datascience/ipywidgets/incompatibleWidgetHandler.unit.test.ts rename to src/test/datascience/ipywidgets/incompatibleWidgetHandler.unit.test.ts diff --git a/src/client/datascience/ipywidgets/ipyWidgetScriptSourceProvider.unit.test.ts b/src/test/datascience/ipywidgets/ipyWidgetScriptSourceProvider.unit.test.ts similarity index 100% rename from src/client/datascience/ipywidgets/ipyWidgetScriptSourceProvider.unit.test.ts rename to src/test/datascience/ipywidgets/ipyWidgetScriptSourceProvider.unit.test.ts diff --git a/src/client/datascience/ipywidgets/localWidgetScriptSourceProvider.unit.test.ts b/src/test/datascience/ipywidgets/localWidgetScriptSourceProvider.unit.test.ts similarity index 100% rename from src/client/datascience/ipywidgets/localWidgetScriptSourceProvider.unit.test.ts rename to src/test/datascience/ipywidgets/localWidgetScriptSourceProvider.unit.test.ts diff --git a/src/client/datascience/jupyter/interpreter/jupyterInterpreterDependencyService.unit.test.ts b/src/test/datascience/jupyter/interpreter/jupyterInterpreterDependencyService.unit.test.ts similarity index 91% rename from src/client/datascience/jupyter/interpreter/jupyterInterpreterDependencyService.unit.test.ts rename to src/test/datascience/jupyter/interpreter/jupyterInterpreterDependencyService.unit.test.ts index 780db882060..12cccbef0e2 100644 --- a/src/client/datascience/jupyter/interpreter/jupyterInterpreterDependencyService.unit.test.ts +++ b/src/test/datascience/jupyter/interpreter/jupyterInterpreterDependencyService.unit.test.ts @@ -5,18 +5,21 @@ import { assert } from 'chai'; import { anything, deepEqual, instance, mock, verify, when } from 'ts-mockito'; -import { ApplicationShell } from '../../../common/application/applicationShell'; -import { IApplicationShell } from '../../../common/application/types'; -import { ProductInstaller } from '../../../common/installer/productInstaller'; -import { IInstaller, InstallerResponse, Product } from '../../../common/types'; -import { DataScience } from '../../../common/utils/localize'; -import { InterpreterJupyterKernelSpecCommand, JupyterCommandFactory } from './jupyterCommand'; +import { ApplicationShell } from '../../../../client/common/application/applicationShell'; +import { IApplicationShell } from '../../../../client/common/application/types'; +import { ProductInstaller } from '../../../../client/common/installer/productInstaller'; +import { IInstaller, InstallerResponse, Product } from '../../../../client/common/types'; +import { DataScience } from '../../../../client/common/utils/localize'; +import { + InterpreterJupyterKernelSpecCommand, + JupyterCommandFactory +} from '../../../../client/datascience/jupyter/interpreter/jupyterCommand'; import { JupyterInterpreterDependencyResponse, JupyterInterpreterDependencyService -} from './jupyterInterpreterDependencyService'; -import { IJupyterCommand, IJupyterCommandFactory } from '../../types'; -import { PythonEnvironment } from '../../../pythonEnvironments/info'; +} from '../../../../client/datascience/jupyter/interpreter/jupyterInterpreterDependencyService'; +import { IJupyterCommand, IJupyterCommandFactory } from '../../../../client/datascience/types'; +import { PythonEnvironment } from '../../../../client/pythonEnvironments/info'; /* eslint-disable , @typescript-eslint/no-explicit-any */ diff --git a/src/client/datascience/jupyter/interpreter/jupyterInterpreterSelectionCommand.unit.test.ts b/src/test/datascience/jupyter/interpreter/jupyterInterpreterSelectionCommand.unit.test.ts similarity index 100% rename from src/client/datascience/jupyter/interpreter/jupyterInterpreterSelectionCommand.unit.test.ts rename to src/test/datascience/jupyter/interpreter/jupyterInterpreterSelectionCommand.unit.test.ts diff --git a/src/client/datascience/jupyter/interpreter/jupyterInterpreterSelector.unit.test.ts b/src/test/datascience/jupyter/interpreter/jupyterInterpreterSelector.unit.test.ts similarity index 100% rename from src/client/datascience/jupyter/interpreter/jupyterInterpreterSelector.unit.test.ts rename to src/test/datascience/jupyter/interpreter/jupyterInterpreterSelector.unit.test.ts diff --git a/src/client/datascience/jupyter/interpreter/jupyterInterpreterService.unit.test.ts b/src/test/datascience/jupyter/interpreter/jupyterInterpreterService.unit.test.ts similarity index 98% rename from src/client/datascience/jupyter/interpreter/jupyterInterpreterService.unit.test.ts rename to src/test/datascience/jupyter/interpreter/jupyterInterpreterService.unit.test.ts index 349c2d13101..058e9fd8f4a 100644 --- a/src/client/datascience/jupyter/interpreter/jupyterInterpreterService.unit.test.ts +++ b/src/test/datascience/jupyter/interpreter/jupyterInterpreterService.unit.test.ts @@ -16,8 +16,8 @@ import { JupyterInterpreterService } from '../../../../client/datascience/jupyte import { JupyterInterpreterStateStore } from '../../../../client/datascience/jupyter/interpreter/jupyterInterpreterStateStore'; import { IInterpreterService } from '../../../../client/interpreter/contracts'; import { PythonEnvironment } from '../../../../client/pythonEnvironments/info'; -import { MockMemento } from '../../../../test/mocks/mementos'; -import { createPythonInterpreter } from '../../../../test/utils/interpreters'; +import { MockMemento } from '../../../mocks/mementos'; +import { createPythonInterpreter } from '../../../utils/interpreters'; /* eslint-disable */ diff --git a/src/client/datascience/jupyter/interpreter/jupyterInterpreterStateStore.unit.test.ts b/src/test/datascience/jupyter/interpreter/jupyterInterpreterStateStore.unit.test.ts similarity index 96% rename from src/client/datascience/jupyter/interpreter/jupyterInterpreterStateStore.unit.test.ts rename to src/test/datascience/jupyter/interpreter/jupyterInterpreterStateStore.unit.test.ts index 3fefca94547..4b1d880e25c 100644 --- a/src/client/datascience/jupyter/interpreter/jupyterInterpreterStateStore.unit.test.ts +++ b/src/test/datascience/jupyter/interpreter/jupyterInterpreterStateStore.unit.test.ts @@ -9,7 +9,7 @@ import { EventEmitter, Memento } from 'vscode'; import { JupyterInterpreterService } from '../../../../client/datascience/jupyter/interpreter/jupyterInterpreterService'; import { JupyterInterpreterStateStore } from '../../../../client/datascience/jupyter/interpreter/jupyterInterpreterStateStore'; import { PythonEnvironment } from '../../../../client/pythonEnvironments/info'; -import { MockMemento } from '../../../../test/mocks/mementos'; +import { MockMemento } from '../../../mocks/mementos'; suite('DataScience - Jupyter Interpreter State', () => { let selected: JupyterInterpreterStateStore; diff --git a/src/client/datascience/jupyter/interpreter/jupyterInterpreterSubCommandExecutionService.unit.test.ts b/src/test/datascience/jupyter/interpreter/jupyterInterpreterSubCommandExecutionService.unit.test.ts similarity index 98% rename from src/client/datascience/jupyter/interpreter/jupyterInterpreterSubCommandExecutionService.unit.test.ts rename to src/test/datascience/jupyter/interpreter/jupyterInterpreterSubCommandExecutionService.unit.test.ts index bf3e93ad8d9..5f9d6ec5645 100644 --- a/src/client/datascience/jupyter/interpreter/jupyterInterpreterSubCommandExecutionService.unit.test.ts +++ b/src/test/datascience/jupyter/interpreter/jupyterInterpreterSubCommandExecutionService.unit.test.ts @@ -28,8 +28,8 @@ import { JupyterInterpreterService } from '../../../../client/datascience/jupyte import { JupyterInterpreterSubCommandExecutionService } from '../../../../client/datascience/jupyter/interpreter/jupyterInterpreterSubCommandExecutionService'; import { JupyterServerInfo } from '../../../../client/datascience/jupyter/jupyterConnection'; import { IInterpreterService } from '../../../../client/interpreter/contracts'; -import { createPythonInterpreter } from '../../../../test/utils/interpreters'; -import { MockOutputChannel } from '../../../../test/mockClasses'; +import { MockOutputChannel } from '../../../mockClasses'; +import { createPythonInterpreter } from '../../../utils/interpreters'; use(chaiPromise); /* eslint-disable */ diff --git a/src/client/datascience/jupyter/jupyterCellOutputMimeTypeTracker.unit.test.ts b/src/test/datascience/jupyter/jupyterCellOutputMimeTypeTracker.unit.test.ts similarity index 100% rename from src/client/datascience/jupyter/jupyterCellOutputMimeTypeTracker.unit.test.ts rename to src/test/datascience/jupyter/jupyterCellOutputMimeTypeTracker.unit.test.ts diff --git a/src/client/datascience/jupyter/jupyterConnection.unit.test.ts b/src/test/datascience/jupyter/jupyterConnection.unit.test.ts similarity index 84% rename from src/client/datascience/jupyter/jupyterConnection.unit.test.ts rename to src/test/datascience/jupyter/jupyterConnection.unit.test.ts index b95d286549c..6f2cebeb9f2 100644 --- a/src/client/datascience/jupyter/jupyterConnection.unit.test.ts +++ b/src/test/datascience/jupyter/jupyterConnection.unit.test.ts @@ -6,18 +6,18 @@ import { Subject } from 'rxjs/Subject'; import * as sinon from 'sinon'; import { anything, instance, mock, when } from 'ts-mockito'; import { CancellationToken } from 'vscode'; -import { JupyterSettings } from '../../common/configSettings'; -import { ConfigurationService } from '../../common/configuration/service'; -import { FileSystem } from '../../common/platform/fileSystem'; -import { IFileSystem } from '../../common/platform/types'; -import { ObservableExecutionResult, Output } from '../../common/process/types'; -import { IConfigurationService, IJupyterSettings } from '../../common/types'; -import { DataScience } from '../../common/utils/localize'; -import { noop } from '../../common/utils/misc'; -import { EXTENSION_ROOT_DIR } from '../../constants'; -import { JupyterConnectionWaiter, JupyterServerInfo } from './jupyterConnection'; -import { ServiceContainer } from '../../ioc/container'; -import { IServiceContainer } from '../../ioc/types'; +import { JupyterSettings } from '../../../client/common/configSettings'; +import { ConfigurationService } from '../../../client/common/configuration/service'; +import { FileSystem } from '../../../client/common/platform/fileSystem'; +import { IFileSystem } from '../../../client/common/platform/types'; +import { ObservableExecutionResult, Output } from '../../../client/common/process/types'; +import { IConfigurationService, IJupyterSettings } from '../../../client/common/types'; +import { DataScience } from '../../../client/common/utils/localize'; +import { noop } from '../../../client/common/utils/misc'; +import { EXTENSION_ROOT_DIR } from '../../../client/constants'; +import { JupyterConnectionWaiter, JupyterServerInfo } from '../../../client/datascience/jupyter/jupyterConnection'; +import { ServiceContainer } from '../../../client/ioc/container'; +import { IServiceContainer } from '../../../client/ioc/types'; /* eslint-disable , @typescript-eslint/no-explicit-any */ suite('DataScience - JupyterConnection', () => { diff --git a/src/client/datascience/jupyter/kernels/jupyterSession.unit.test.ts b/src/test/datascience/jupyter/jupyterSession.unit.test.ts similarity index 96% rename from src/client/datascience/jupyter/kernels/jupyterSession.unit.test.ts rename to src/test/datascience/jupyter/jupyterSession.unit.test.ts index 76c5d7df397..f4570d3eb3e 100644 --- a/src/client/datascience/jupyter/kernels/jupyterSession.unit.test.ts +++ b/src/test/datascience/jupyter/jupyterSession.unit.test.ts @@ -16,18 +16,18 @@ import { ISignal } from '@lumino/signaling'; import { assert } from 'chai'; import { anything, instance, mock, verify, when } from 'ts-mockito'; import { CancellationTokenSource, Uri } from 'vscode'; -import { MockOutputChannel } from '../../../../test/mockClasses'; -import { traceInfo } from '../../../common/logger'; - -import { ReadWrite, Resource } from '../../../common/types'; -import { createDeferred, Deferred } from '../../../common/utils/async'; -import { DataScience } from '../../../common/utils/localize'; -import { noop } from '../../../common/utils/misc'; -import { DisplayOptions } from '../../../datascience/displayOptions'; -import { JupyterSession } from '../../../datascience/jupyter/jupyterSession'; -import { JupyterKernelService } from '../../../datascience/jupyter/kernels/jupyterKernelService'; -import { KernelConnectionMetadata, LiveKernelModel } from '../../../datascience/jupyter/kernels/types'; -import { IJupyterConnection, ISessionWithSocket } from '../../../datascience/types'; + +import { traceInfo } from '../../../client/common/logger'; +import { ReadWrite, Resource } from '../../../client/common/types'; +import { createDeferred, Deferred } from '../../../client/common/utils/async'; +import { DataScience } from '../../../client/common/utils/localize'; +import { noop } from '../../../client/common/utils/misc'; +import { DisplayOptions } from '../../../client/datascience/displayOptions'; +import { JupyterSession } from '../../../client/datascience/jupyter/jupyterSession'; +import { JupyterKernelService } from '../../../client/datascience/jupyter/kernels/jupyterKernelService'; +import { KernelConnectionMetadata, LiveKernelModel } from '../../../client/datascience/jupyter/kernels/types'; +import { IJupyterConnection, ISessionWithSocket } from '../../../client/datascience/types'; +import { MockOutputChannel } from '../../mockClasses'; /* eslint-disable , @typescript-eslint/no-explicit-any */ suite('DataScience - JupyterSession', () => { diff --git a/src/client/datascience/jupyter/kernels/jupyterKernelService.unit.test.ts b/src/test/datascience/jupyter/kernels/jupyterKernelService.unit.test.ts similarity index 95% rename from src/client/datascience/jupyter/kernels/jupyterKernelService.unit.test.ts rename to src/test/datascience/jupyter/kernels/jupyterKernelService.unit.test.ts index dfb0b837e58..39c59c3a46b 100644 --- a/src/client/datascience/jupyter/kernels/jupyterKernelService.unit.test.ts +++ b/src/test/datascience/jupyter/kernels/jupyterKernelService.unit.test.ts @@ -5,22 +5,22 @@ import { assert } from 'chai'; import { anything, instance, mock, when, verify, capture } from 'ts-mockito'; -import { FileSystem } from '../../../common/platform/fileSystem'; -import { IFileSystem } from '../../../common/platform/types'; -import { KernelDependencyService } from './kernelDependencyService'; -import { JupyterKernelService } from './jupyterKernelService'; -import { LocalKernelConnectionMetadata } from './types'; -import { LocalKernelFinder } from '../../kernel-launcher/localKernelFinder'; -import { ILocalKernelFinder } from '../../kernel-launcher/types'; -import { IEnvironmentActivationService } from '../../../interpreter/activation/types'; -import { IKernelDependencyService } from '../../types'; -import { EnvironmentType } from '../../../pythonEnvironments/info'; -import { EXTENSION_ROOT_DIR } from '../../../constants'; +import { FileSystem } from '../../../../client/common/platform/fileSystem'; +import { IFileSystem } from '../../../../client/common/platform/types'; +import { KernelDependencyService } from '../../../../client/datascience/jupyter/kernels/kernelDependencyService'; +import { JupyterKernelService } from '../../../../client/datascience/jupyter/kernels/jupyterKernelService'; +import { LocalKernelConnectionMetadata } from '../../../../client/datascience/jupyter/kernels/types'; +import { LocalKernelFinder } from '../../../../client/datascience/kernel-launcher/localKernelFinder'; +import { ILocalKernelFinder } from '../../../../client/datascience/kernel-launcher/types'; +import { IEnvironmentActivationService } from '../../../../client/interpreter/activation/types'; +import { IKernelDependencyService } from '../../../../client/datascience/types'; +import { EnvironmentType } from '../../../../client/pythonEnvironments/info'; +import { EXTENSION_ROOT_DIR } from '../../../../client/constants'; import * as path from 'path'; -import { arePathsSame, getOSType, OSType } from '../../../../test/common'; -import { DisplayOptions } from '../../displayOptions'; +import { arePathsSame, getOSType, OSType } from '../../../common'; +import { DisplayOptions } from '../../../../client/datascience/displayOptions'; import { CancellationTokenSource } from 'vscode'; -import { EnvironmentVariablesService } from '../../../common/variables/environment'; +import { EnvironmentVariablesService } from '../../../../client/common/variables/environment'; // eslint-disable-next-line suite('DataScience - JupyterKernelService', () => { diff --git a/src/client/datascience/jupyter/kernels/kernelDependencyService.unit.test.ts b/src/test/datascience/jupyter/kernels/kernelDependencyService.unit.test.ts similarity index 99% rename from src/client/datascience/jupyter/kernels/kernelDependencyService.unit.test.ts rename to src/test/datascience/jupyter/kernels/kernelDependencyService.unit.test.ts index 82360f6f85d..689d7a7608f 100644 --- a/src/client/datascience/jupyter/kernels/kernelDependencyService.unit.test.ts +++ b/src/test/datascience/jupyter/kernels/kernelDependencyService.unit.test.ts @@ -24,7 +24,7 @@ import { } from '../../../../client/datascience/types'; import { IServiceContainer } from '../../../../client/ioc/types'; import { EnvironmentType } from '../../../../client/pythonEnvironments/info'; -import { createPythonInterpreter } from '../../../../test/utils/interpreters'; +import { createPythonInterpreter } from '../../../utils/interpreters'; /* eslint-disable @typescript-eslint/no-explicit-any */ diff --git a/src/client/datascience/jupyter/serverSelector.unit.test.ts b/src/test/datascience/jupyter/serverSelector.unit.test.ts similarity index 89% rename from src/client/datascience/jupyter/serverSelector.unit.test.ts rename to src/test/datascience/jupyter/serverSelector.unit.test.ts index d22f93f25c2..31af0f7d21b 100644 --- a/src/client/datascience/jupyter/serverSelector.unit.test.ts +++ b/src/test/datascience/jupyter/serverSelector.unit.test.ts @@ -6,24 +6,24 @@ import { anyString, anything, instance, mock, when } from 'ts-mockito'; import * as sinon from 'sinon'; import * as os from 'os'; import { QuickPickItem } from 'vscode'; -import { ApplicationShell } from '../../common/application/applicationShell'; -import { ClipboardService } from '../../common/application/clipboard'; -import { IClipboard } from '../../common/application/types'; -import { ConfigurationService } from '../../common/configuration/service'; -import { IJupyterSettings } from '../../common/types'; -import { DataScience } from '../../common/utils/localize'; -import { MultiStepInput, MultiStepInputFactory } from '../../common/utils/multiStepInput'; -import { Settings } from '../constants'; -import { JupyterServerSelector } from './serverSelector'; -import { JupyterUriProviderRegistration } from '../jupyterUriProviderRegistration'; -import { MockInputBox } from '../../../test/datascience/mockInputBox'; -import { MockQuickPick } from '../../../test/datascience/mockQuickPick'; -import { JupyterServerUriStorage } from './serverUriStorage'; -import { MockMemento } from '../../../test/mocks/mementos'; -import { WorkspaceService } from '../../common/application/workspace'; -import { CryptoUtils } from '../../common/crypto'; -import { ApplicationEnvironment } from '../../common/application/applicationEnvironment'; -import { MockEncryptedStorage } from '../../../test/datascience/mockEncryptedStorage'; +import { ApplicationShell } from '../../../client/common/application/applicationShell'; +import { ClipboardService } from '../../../client/common/application/clipboard'; +import { IClipboard } from '../../../client/common/application/types'; +import { ConfigurationService } from '../../../client/common/configuration/service'; +import { IJupyterSettings } from '../../../client/common/types'; +import { DataScience } from '../../../client/common/utils/localize'; +import { MultiStepInput, MultiStepInputFactory } from '../../../client/common/utils/multiStepInput'; +import { Settings } from '../../../client/datascience/constants'; +import { JupyterServerSelector } from '../../../client/datascience/jupyter/serverSelector'; +import { JupyterUriProviderRegistration } from '../../../client/datascience/jupyterUriProviderRegistration'; +import { MockInputBox } from '../mockInputBox'; +import { MockQuickPick } from '../mockQuickPick'; +import { JupyterServerUriStorage } from '../../../client/datascience/jupyter/serverUriStorage'; +import { MockMemento } from '../../mocks/mementos'; +import { WorkspaceService } from '../../../client/common/application/workspace'; +import { CryptoUtils } from '../../../client/common/crypto'; +import { ApplicationEnvironment } from '../../../client/common/application/applicationEnvironment'; +import { MockEncryptedStorage } from '../mockEncryptedStorage'; /* eslint-disable , @typescript-eslint/no-explicit-any */ suite('DataScience - Jupyter Server URI Selector', () => { diff --git a/src/client/datascience/jupyter/jupyterPasswordConnect.unit.test.ts b/src/test/datascience/jupyterPasswordConnect.unit.test.ts similarity index 95% rename from src/client/datascience/jupyter/jupyterPasswordConnect.unit.test.ts rename to src/test/datascience/jupyterPasswordConnect.unit.test.ts index 2dff39740cc..048eecfe8f3 100644 --- a/src/client/datascience/jupyter/jupyterPasswordConnect.unit.test.ts +++ b/src/test/datascience/jupyterPasswordConnect.unit.test.ts @@ -7,13 +7,13 @@ import * as nodeFetch from 'node-fetch'; import * as typemoq from 'typemoq'; import { anything, instance, mock, when } from 'ts-mockito'; -import { ApplicationShell } from '../../common/application/applicationShell'; -import { AsyncDisposableRegistry } from '../../common/asyncDisposableRegistry'; -import { ConfigurationService } from '../../common/configuration/service'; -import { MultiStepInputFactory } from '../../common/utils/multiStepInput'; -import { JupyterPasswordConnect } from './jupyterPasswordConnect'; -import { MockInputBox } from '../../../test/datascience/mockInputBox'; -import { MockQuickPick } from '../../../test/datascience/mockQuickPick'; +import { ApplicationShell } from '../../client/common/application/applicationShell'; +import { AsyncDisposableRegistry } from '../../client/common/asyncDisposableRegistry'; +import { ConfigurationService } from '../../client/common/configuration/service'; +import { MultiStepInputFactory } from '../../client/common/utils/multiStepInput'; +import { JupyterPasswordConnect } from '../../client/datascience/jupyter/jupyterPasswordConnect'; +import { MockInputBox } from './mockInputBox'; +import { MockQuickPick } from './mockQuickPick'; /* eslint-disable @typescript-eslint/no-explicit-any, , */ suite('JupyterPasswordConnect', () => { diff --git a/src/client/datascience/jupyterUriProviderRegistration.unit.test.ts b/src/test/datascience/jupyterUriProviderRegistration.unit.test.ts similarity index 95% rename from src/client/datascience/jupyterUriProviderRegistration.unit.test.ts rename to src/test/datascience/jupyterUriProviderRegistration.unit.test.ts index fcd1e7f9f11..2e538ac990d 100644 --- a/src/client/datascience/jupyterUriProviderRegistration.unit.test.ts +++ b/src/test/datascience/jupyterUriProviderRegistration.unit.test.ts @@ -7,10 +7,10 @@ import * as sinon from 'sinon'; import { anything, instance, mock, when } from 'ts-mockito'; import * as TypeMoq from 'typemoq'; import * as vscode from 'vscode'; -import { Extensions } from '../common/application/extensions'; -import { FileSystem } from '../common/platform/fileSystem'; -import { JupyterUriProviderRegistration } from './jupyterUriProviderRegistration'; -import { IJupyterServerUri, IJupyterUriProvider, JupyterServerUriHandle } from './types'; +import { Extensions } from '../../client/common/application/extensions'; +import { FileSystem } from '../../client/common/platform/fileSystem'; +import { JupyterUriProviderRegistration } from '../../client/datascience/jupyterUriProviderRegistration'; +import { IJupyterServerUri, IJupyterUriProvider, JupyterServerUriHandle } from '../../client/datascience/types'; class MockProvider implements IJupyterUriProvider { public get id() { diff --git a/src/client/datascience/kernel-launcher/localKernelFinder.unit.test.ts b/src/test/datascience/kernel-launcher/localKernelFinder.unit.test.ts similarity index 97% rename from src/client/datascience/kernel-launcher/localKernelFinder.unit.test.ts rename to src/test/datascience/kernel-launcher/localKernelFinder.unit.test.ts index 28fdfc9fe78..fc88f6c41c6 100644 --- a/src/client/datascience/kernel-launcher/localKernelFinder.unit.test.ts +++ b/src/test/datascience/kernel-launcher/localKernelFinder.unit.test.ts @@ -8,44 +8,44 @@ import * as path from 'path'; import * as fsExtra from 'fs-extra'; import * as sinon from 'sinon'; import { anything, instance, mock, when } from 'ts-mockito'; -import { PathUtils } from '../../common/platform/pathUtils'; -import { IFileSystem, IPlatformService } from '../../common/platform/types'; -import { LocalKernelFinder } from './localKernelFinder'; -import { ILocalKernelFinder } from './types'; -import { IInterpreterService } from '../../interpreter/contracts'; -import { WorkspaceService } from '../../common/application/workspace'; -import { EnvironmentVariablesProvider } from '../../common/variables/environmentVariablesProvider'; -import { InterpreterService, PythonExtensionChecker } from '../../api/pythonApi'; +import { PathUtils } from '../../../client/common/platform/pathUtils'; +import { IFileSystem, IPlatformService } from '../../../client/common/platform/types'; +import { LocalKernelFinder } from '../../../client/datascience/kernel-launcher/localKernelFinder'; +import { ILocalKernelFinder } from '../../../client/datascience/kernel-launcher/types'; +import { IInterpreterService } from '../../../client/interpreter/contracts'; +import { WorkspaceService } from '../../../client/common/application/workspace'; +import { EnvironmentVariablesProvider } from '../../../client/common/variables/environmentVariablesProvider'; +import { InterpreterService, PythonExtensionChecker } from '../../../client/api/pythonApi'; import { createInterpreterKernelSpec, getDisplayNameOrNameOfKernelConnection, getInterpreterKernelSpecName, getKernelId, getKernelRegistrationInfo -} from '../jupyter/kernels/helpers'; -import { PlatformService } from '../../common/platform/platformService'; -import { EXTENSION_ROOT_DIR } from '../../constants'; -import { FileSystem } from '../../common/platform/fileSystem'; +} from '../../../client/datascience/jupyter/kernels/helpers'; +import { PlatformService } from '../../../client/common/platform/platformService'; +import { EXTENSION_ROOT_DIR } from '../../../client/constants'; +import { FileSystem } from '../../../client/common/platform/fileSystem'; import type { KernelSpec } from '@jupyterlab/services'; -import { EnvironmentType, PythonEnvironment } from '../../pythonEnvironments/info'; -import { IPythonExtensionChecker } from '../../api/types'; -import { PYTHON_LANGUAGE } from '../../common/constants'; -import { arePathsSame, getOSType } from '../../../test/common'; +import { EnvironmentType, PythonEnvironment } from '../../../client/pythonEnvironments/info'; +import { IPythonExtensionChecker } from '../../../client/api/types'; +import { PYTHON_LANGUAGE } from '../../../client/common/constants'; +import { arePathsSame, getOSType } from '../../common'; import { EventEmitter, Memento, Uri } from 'vscode'; -import { IDisposable } from '../../common/types'; -import { LocalKnownPathKernelSpecFinder } from './localKnownPathKernelSpecFinder'; -import { JupyterPaths } from './jupyterPaths'; -import { LocalPythonAndRelatedNonPythonKernelSpecFinder } from './localPythonAndRelatedNonPythonKernelSpecFinder'; +import { IDisposable } from '../../../client/common/types'; +import { LocalKnownPathKernelSpecFinder } from '../../../client/datascience/kernel-launcher/localKnownPathKernelSpecFinder'; +import { JupyterPaths } from '../../../client/datascience/kernel-launcher/jupyterPaths'; +import { LocalPythonAndRelatedNonPythonKernelSpecFinder } from '../../../client/datascience/kernel-launcher/localPythonAndRelatedNonPythonKernelSpecFinder'; import { areInterpreterPathsSame, getInterpreterHash, getNormalizedInterpreterPath -} from '../../pythonEnvironments/info/interpreter'; -import { OSType } from '../../common/utils/platform'; -import { disposeAllDisposables } from '../../common/helpers'; -import { KernelConnectionMetadata } from '../jupyter/kernels/types'; -import { loadKernelSpec } from './localKernelSpecFinderBase'; -import { traceInfoIfCI } from '../../common/logger'; +} from '../../../client/pythonEnvironments/info/interpreter'; +import { OSType } from '../../../client/common/utils/platform'; +import { disposeAllDisposables } from '../../../client/common/helpers'; +import { KernelConnectionMetadata } from '../../../client/datascience/jupyter/kernels/types'; +import { loadKernelSpec } from '../../../client/datascience/kernel-launcher/localKernelSpecFinderBase'; +import { traceInfoIfCI } from '../../../client/common/logger'; [false, true].forEach((isWindows) => { suite(`Local Kernel Finder ${isWindows ? 'Windows' : 'Unix'}`, () => { diff --git a/src/client/datascience/kernel-launcher/remoteKernelFinder.unit.test.ts b/src/test/datascience/kernel-launcher/remoteKernelFinder.unit.test.ts similarity index 98% rename from src/client/datascience/kernel-launcher/remoteKernelFinder.unit.test.ts rename to src/test/datascience/kernel-launcher/remoteKernelFinder.unit.test.ts index 0d77a7079f5..ea537a0b1a6 100644 --- a/src/client/datascience/kernel-launcher/remoteKernelFinder.unit.test.ts +++ b/src/test/datascience/kernel-launcher/remoteKernelFinder.unit.test.ts @@ -12,6 +12,7 @@ import { PYTHON_LANGUAGE } from '../../../client/common/constants'; import { RemoteKernelFinder } from '../../../client/datascience/kernel-launcher/remoteKernelFinder'; import { Disposable, EventEmitter, Uri } from 'vscode'; import { PreferredRemoteKernelIdProvider } from '../../../client/datascience/notebookStorage/preferredRemoteKernelIdProvider'; +import { MockMemento } from '../../mocks/mementos'; import { CryptoUtils } from '../../../client/common/crypto'; import { IJupyterConnection, @@ -21,10 +22,9 @@ import { } from '../../../client/datascience/types'; import { JupyterSessionManagerFactory } from '../../../client/datascience/jupyter/jupyterSessionManagerFactory'; import { JupyterSessionManager } from '../../../client/datascience/jupyter/jupyterSessionManager'; +import { noop } from '../../core'; import { LiveKernelConnectionMetadata } from '../../../client/datascience/jupyter/kernels/types'; import { IInterpreterService } from '../../../client/interpreter/contracts'; -import { MockMemento } from '../../../test/mocks/mementos'; -import { noop } from '../../../test/core'; suite(`Remote Kernel Finder`, () => { let disposables: Disposable[] = []; diff --git a/src/client/datascience/notebook/intellisense/completionProvider.unit.test.ts b/src/test/datascience/notebook/intellisense/completionProvider.unit.test.ts similarity index 96% rename from src/client/datascience/notebook/intellisense/completionProvider.unit.test.ts rename to src/test/datascience/notebook/intellisense/completionProvider.unit.test.ts index 7d9d69c6d7d..564b11c742b 100644 --- a/src/client/datascience/notebook/intellisense/completionProvider.unit.test.ts +++ b/src/test/datascience/notebook/intellisense/completionProvider.unit.test.ts @@ -5,8 +5,12 @@ import { assert } from 'chai'; import * as vscode from 'vscode'; -import { filterCompletions, generateSortString, JupyterCompletionItem } from './pythonKernelCompletionProvider'; -import { MockDocument } from '../../../../test/datascience/mockDocument'; +import { + filterCompletions, + generateSortString, + JupyterCompletionItem +} from '../../../../client/datascience/notebook/intellisense/pythonKernelCompletionProvider'; +import { MockDocument } from '../../mockDocument'; suite('DataScience - Jupyter Completion Unit Tests', () => { let mockDocument: MockDocument; diff --git a/src/client/datascience/notebook/notebookControllerManager.unit.test.ts b/src/test/datascience/notebook/notebookControllerManager.unit.test.ts similarity index 98% rename from src/client/datascience/notebook/notebookControllerManager.unit.test.ts rename to src/test/datascience/notebook/notebookControllerManager.unit.test.ts index 6d5ef50ea34..6245678ca8e 100644 --- a/src/client/datascience/notebook/notebookControllerManager.unit.test.ts +++ b/src/test/datascience/notebook/notebookControllerManager.unit.test.ts @@ -3,9 +3,9 @@ import { assert } from 'chai'; import { when, instance, mock } from 'ts-mockito'; -import { getDisplayNameOrNameOfKernelConnection } from '../jupyter/kernels/helpers'; -import { IJupyterKernelSpec } from '../types'; -import { EnvironmentType, PythonEnvironment } from '../../pythonEnvironments/info'; +import { getDisplayNameOrNameOfKernelConnection } from '../../../client/datascience/jupyter/kernels/helpers'; +import { IJupyterKernelSpec } from '../../../client/datascience/types'; +import { EnvironmentType, PythonEnvironment } from '../../../client/pythonEnvironments/info'; suite('Notebook Controller Manager', () => { test('Live kernels should display the name`', () => { diff --git a/src/client/datascience/preWarmVariables.unit.test.ts b/src/test/datascience/preWarmVariables.unit.test.ts similarity index 85% rename from src/client/datascience/preWarmVariables.unit.test.ts rename to src/test/datascience/preWarmVariables.unit.test.ts index b01978d2eab..3caf490faf2 100644 --- a/src/client/datascience/preWarmVariables.unit.test.ts +++ b/src/test/datascience/preWarmVariables.unit.test.ts @@ -5,19 +5,19 @@ import { anything, instance, mock, verify, when } from 'ts-mockito'; import { EventEmitter } from 'vscode'; -import { IExtensionSingleActivationService } from '../activation/types'; -import { PythonExtensionChecker } from '../api/pythonApi'; -import { IPythonApiProvider, IPythonExtensionChecker } from '../api/types'; -import { IWorkspaceService } from '../common/application/types'; -import { CondaService } from '../common/process/condaService'; -import { createDeferred } from '../common/utils/async'; -import { IEnvironmentVariablesProvider } from '../common/variables/types'; -import { JupyterInterpreterService } from './jupyter/interpreter/jupyterInterpreterService'; -import { PreWarmActivatedJupyterEnvironmentVariables } from './preWarmVariables'; -import { IRawNotebookSupportedService } from './types'; -import { IEnvironmentActivationService } from '../interpreter/activation/types'; -import { PythonEnvironment } from '../pythonEnvironments/info'; -import { sleep } from '../../test/core'; +import { IExtensionSingleActivationService } from '../../client/activation/types'; +import { PythonExtensionChecker } from '../../client/api/pythonApi'; +import { IPythonApiProvider, IPythonExtensionChecker } from '../../client/api/types'; +import { IWorkspaceService } from '../../client/common/application/types'; +import { CondaService } from '../../client/common/process/condaService'; +import { createDeferred } from '../../client/common/utils/async'; +import { IEnvironmentVariablesProvider } from '../../client/common/variables/types'; +import { JupyterInterpreterService } from '../../client/datascience/jupyter/interpreter/jupyterInterpreterService'; +import { PreWarmActivatedJupyterEnvironmentVariables } from '../../client/datascience/preWarmVariables'; +import { IRawNotebookSupportedService } from '../../client/datascience/types'; +import { IEnvironmentActivationService } from '../../client/interpreter/activation/types'; +import { PythonEnvironment } from '../../client/pythonEnvironments/info'; +import { sleep } from '../core'; suite('DataScience - PreWarm Env Vars', () => { let activationService: IExtensionSingleActivationService; diff --git a/src/client/datascience/progress/decorators.unit.test.ts b/src/test/datascience/progress/decorators.unit.test.ts similarity index 98% rename from src/client/datascience/progress/decorators.unit.test.ts rename to src/test/datascience/progress/decorators.unit.test.ts index b2539905add..099fd7fdf7c 100644 --- a/src/client/datascience/progress/decorators.unit.test.ts +++ b/src/test/datascience/progress/decorators.unit.test.ts @@ -12,7 +12,7 @@ import { } from '../../../client/datascience/progress/decorator'; import { ProgressReporter } from '../../../client/datascience/progress/progressReporter'; import { IProgressReporter, ReportableAction } from '../../../client/datascience/progress/types'; -import { noop } from '../../../test/core'; +import { noop } from '../../core'; suite('DataScience - Progress Reporter Decorator', () => { let reporter: IProgressReporter; diff --git a/src/client/datascience/progress/progressReporter.unit.test.ts b/src/test/datascience/progress/progressReporter.unit.test.ts similarity index 93% rename from src/client/datascience/progress/progressReporter.unit.test.ts rename to src/test/datascience/progress/progressReporter.unit.test.ts index 7c52d17febb..3227d3fab32 100644 --- a/src/client/datascience/progress/progressReporter.unit.test.ts +++ b/src/test/datascience/progress/progressReporter.unit.test.ts @@ -6,12 +6,12 @@ import { assert } from 'chai'; import { anything, instance, mock, verify, when } from 'ts-mockito'; import { CancellationToken, CancellationTokenSource, Progress as VSCProgress } from 'vscode'; -import { ApplicationShell } from '../../common/application/applicationShell'; -import { IApplicationShell } from '../../common/application/types'; -import { getUserMessageForAction } from './messages'; -import { ProgressReporter } from './progressReporter'; -import { ReportableAction } from './types'; -import { noop, sleep } from '../../../test/core'; +import { ApplicationShell } from '../../../client/common/application/applicationShell'; +import { IApplicationShell } from '../../../client/common/application/types'; +import { getUserMessageForAction } from '../../../client/datascience/progress/messages'; +import { ProgressReporter } from '../../../client/datascience/progress/progressReporter'; +import { ReportableAction } from '../../../client/datascience/progress/types'; +import { noop, sleep } from '../../core'; type Task = ( progress: VSCProgress<{ message?: string; increment?: number }>, token: CancellationToken diff --git a/src/client/datascience/shiftEnterBanner.unit.test.ts b/src/test/datascience/shiftEnterBanner.unit.test.ts similarity index 95% rename from src/client/datascience/shiftEnterBanner.unit.test.ts rename to src/test/datascience/shiftEnterBanner.unit.test.ts index 498666212e2..1dd23471d3d 100644 --- a/src/client/datascience/shiftEnterBanner.unit.test.ts +++ b/src/test/datascience/shiftEnterBanner.unit.test.ts @@ -6,16 +6,16 @@ import { expect } from 'chai'; import rewiremock from 'rewiremock'; import * as typemoq from 'typemoq'; -import { IApplicationShell } from '../common/application/types'; +import { IApplicationShell } from '../../client/common/application/types'; import { IConfigurationService, IPersistentState, IPersistentStateFactory, IWatchableJupyterSettings -} from '../common/types'; -import { Telemetry } from './constants'; -import { InteractiveShiftEnterBanner, InteractiveShiftEnterStateKeys } from './shiftEnterBanner'; -import { clearTelemetryReporter } from '../telemetry'; +} from '../../client/common/types'; +import { Telemetry } from '../../client/datascience/constants'; +import { InteractiveShiftEnterBanner, InteractiveShiftEnterStateKeys } from '../../client/datascience/shiftEnterBanner'; +import { clearTelemetryReporter } from '../../client/telemetry'; suite('Interactive Shift Enter Banner', () => { const oldValueOfVSC_JUPYTER_UNIT_TEST = process.env.VSC_JUPYTER_UNIT_TEST; diff --git a/src/client/debugger/jupyter/helpers.unit.test.ts b/src/test/debugger/jupyter/helpers.unit.test.ts similarity index 91% rename from src/client/debugger/jupyter/helpers.unit.test.ts rename to src/test/debugger/jupyter/helpers.unit.test.ts index 4cb4e452618..74c0d08768f 100644 --- a/src/client/debugger/jupyter/helpers.unit.test.ts +++ b/src/test/debugger/jupyter/helpers.unit.test.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import { expect } from 'chai'; -import { isShortNamePath } from './helper'; +import { isShortNamePath } from '../../../client/debugger/jupyter/helper'; suite('Debugging - Helpers', () => { suite('isShortNamePath', async () => { diff --git a/src/client/telemetry/importTracker.unit.test.ts b/src/test/telemetry/importTracker.unit.test.ts similarity index 95% rename from src/client/telemetry/importTracker.unit.test.ts rename to src/test/telemetry/importTracker.unit.test.ts index 86440007838..116f152804a 100644 --- a/src/client/telemetry/importTracker.unit.test.ts +++ b/src/test/telemetry/importTracker.unit.test.ts @@ -8,13 +8,13 @@ import { instance, mock, when } from 'ts-mockito'; import * as TypeMoq from 'typemoq'; import { EventEmitter, NotebookDocument, TextDocument } from 'vscode'; -import { IDocumentManager, IVSCodeNotebook } from '../common/application/types'; -import { disposeAllDisposables } from '../common/helpers'; -import { IDisposable } from '../common/types'; -import { EventName } from './constants'; -import { getTelemetrySafeHashedString } from './helpers'; -import { ImportTracker } from './importTracker'; -import { createDocument } from '../../test/datascience/editor-integration/helpers'; +import { IDocumentManager, IVSCodeNotebook } from '../../client/common/application/types'; +import { disposeAllDisposables } from '../../client/common/helpers'; +import { IDisposable } from '../../client/common/types'; +import { EventName } from '../../client/telemetry/constants'; +import { getTelemetrySafeHashedString } from '../../client/telemetry/helpers'; +import { ImportTracker } from '../../client/telemetry/importTracker'; +import { createDocument } from '../datascience/editor-integration/helpers'; suite('Import Tracker', () => { const oldValueOfVSC_JUPYTER_UNIT_TEST = process.env.VSC_JUPYTER_UNIT_TEST; diff --git a/src/client/telemetry/index.unit.test.ts b/src/test/telemetry/index.unit.test.ts similarity index 100% rename from src/client/telemetry/index.unit.test.ts rename to src/test/telemetry/index.unit.test.ts