Skip to content

Commit

Permalink
remove unnecessary logging of error (#871)
Browse files Browse the repository at this point in the history
Fixes #236
  • Loading branch information
DonJayamanne authored Feb 22, 2018
1 parent 5bc6c1c commit 58be8f8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion src/client/interpreter/locators/services/condaService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export class CondaService implements ICondaService {
// Failed because either:
// 1. conda is not installed.
// 2. `conda info --json` has changed signature.
this.logger.logError('Failed to get conda info from conda', ex);
}
}
/**
Expand Down
5 changes: 1 addition & 4 deletions src/test/interpreters/condaService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ const environmentsPath = path.join(__dirname, '..', '..', '..', 'src', 'test', '

// tslint:disable-next-line:max-func-body-length
suite('Interpreters Conda Service', () => {
let logger: TypeMoq.IMock<ILogger>;
let processService: TypeMoq.IMock<IProcessService>;
let platformService: TypeMoq.IMock<IPlatformService>;
let condaService: CondaService;
let fileSystem: TypeMoq.IMock<IFileSystem>;
let registryInterpreterLocatorService: TypeMoq.IMock<IInterpreterLocatorService>;
let serviceContainer: TypeMoq.IMock<IServiceContainer>;
setup(async () => {
logger = TypeMoq.Mock.ofType<ILogger>();
const logger = TypeMoq.Mock.ofType<ILogger>();
processService = TypeMoq.Mock.ofType<IProcessService>();
platformService = TypeMoq.Mock.ofType<IPlatformService>();
registryInterpreterLocatorService = TypeMoq.Mock.ofType<IInterpreterLocatorService>();
Expand Down Expand Up @@ -391,7 +390,6 @@ suite('Interpreters Conda Service', () => {

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

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

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

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

0 comments on commit 58be8f8

Please sign in to comment.