Skip to content

Commit 58be8f8

Browse files
authored
remove unnecessary logging of error (microsoft#871)
Fixes microsoft#236
1 parent 5bc6c1c commit 58be8f8

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

src/client/interpreter/locators/services/condaService.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ export class CondaService implements ICondaService {
7474
// Failed because either:
7575
// 1. conda is not installed.
7676
// 2. `conda info --json` has changed signature.
77-
this.logger.logError('Failed to get conda info from conda', ex);
7877
}
7978
}
8079
/**

src/test/interpreters/condaService.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,14 @@ const environmentsPath = path.join(__dirname, '..', '..', '..', 'src', 'test', '
1919

2020
// tslint:disable-next-line:max-func-body-length
2121
suite('Interpreters Conda Service', () => {
22-
let logger: TypeMoq.IMock<ILogger>;
2322
let processService: TypeMoq.IMock<IProcessService>;
2423
let platformService: TypeMoq.IMock<IPlatformService>;
2524
let condaService: CondaService;
2625
let fileSystem: TypeMoq.IMock<IFileSystem>;
2726
let registryInterpreterLocatorService: TypeMoq.IMock<IInterpreterLocatorService>;
2827
let serviceContainer: TypeMoq.IMock<IServiceContainer>;
2928
setup(async () => {
30-
logger = TypeMoq.Mock.ofType<ILogger>();
29+
const logger = TypeMoq.Mock.ofType<ILogger>();
3130
processService = TypeMoq.Mock.ofType<IProcessService>();
3231
platformService = TypeMoq.Mock.ofType<IPlatformService>();
3332
registryInterpreterLocatorService = TypeMoq.Mock.ofType<IInterpreterLocatorService>();
@@ -391,7 +390,6 @@ suite('Interpreters Conda Service', () => {
391390

392391
const condaInfo = await condaService.getCondaInfo();
393392
assert.equal(condaInfo, undefined, 'Conda info does not match');
394-
logger.verify(l => l.logError(TypeMoq.It.isAny(), TypeMoq.It.isAny()), TypeMoq.Times.once());
395393
});
396394

397395
test('Returns conda environments when conda exists', async () => {
@@ -453,7 +451,6 @@ suite('Interpreters Conda Service', () => {
453451

454452
const condaInfo = await condaService.getCondaInfo();
455453
assert.equal(condaInfo, undefined, 'Conda info does not match');
456-
logger.verify(l => l.logError(TypeMoq.It.isAny(), TypeMoq.It.isAny()), TypeMoq.Times.once());
457454
});
458455

459456
test('Must use Conda env from Registry to locate conda.exe', async () => {

0 commit comments

Comments
 (0)