Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to failing functional tests #67

Merged
merged 2 commits into from
Sep 17, 2020
Merged

Fixes to failing functional tests #67

merged 2 commits into from
Sep 17, 2020

Conversation

DonJayamanne
Copy link
Contributor

For #28

  • Some tests require multiple interpreters.
    • Its easier to provide the two interpreters in functional tests than implement all of the code for discovery of interpreters.
    • I could find only one such test.
  • Other tests require triggering changes of interpreter
    • Solution is to merely trigger the onDidChangeInterpeter event.

import { IInterpreterService } from '../../client/interpreter/contracts';
import { PythonEnvironment } from '../../client/pythonEnvironments/info';

let interpretersCache: Promise<PythonEnvironment[]> | undefined;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cache for faster functional tests, no need to discover every time.
(adding back an optimization that we had added to Core extension for purposes of testing)

async function getAllInterpreters(): Promise<PythonEnvironment[]> {
const allInterpreters = await Promise.all([
getInterpreterInfo(process.env.CI_PYTHON_PATH as string),
getInterpreterInfo(process.env.CI_PYTHON_PATH2 as string),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added support for a second Python Path (on CI we'll need to setup two interpreters for this test).

@DonJayamanne DonJayamanne merged commit c280df1 into main Sep 17, 2020
@DonJayamanne DonJayamanne deleted the fixFailingFuncTest branch September 17, 2020 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant