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

Fix changing notebook Python intepreter also changing console #5307

Merged
merged 3 commits into from
Nov 9, 2024

Conversation

seeM
Copy link
Contributor

@seeM seeM commented Nov 8, 2024

Addresses #5305. I also added unit tests for the Python runtime session class. They're not necessary for this specific change, but the setup will be useful moving forward.

@seeM seeM requested review from nstrayer and isabelizimm November 8, 2024 15:24
nstrayer
nstrayer previously approved these changes Nov 8, 2024
Copy link
Contributor

@nstrayer nstrayer left a comment

Choose a reason for hiding this comment

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

Tested locally and works as advertised. I couldn't actually figure out how to run the unit test.

extensions/positron-python/src/test/mocks/pst/index.ts Outdated Show resolved Hide resolved
extensions/positron-python/src/test/vscode-mock.ts Outdated Show resolved Hide resolved
@nstrayer
Copy link
Contributor

nstrayer commented Nov 8, 2024

Oh I think we need to add

        // ...
	{
		label: 'positron-python',
		workspaceFolder: path.join(os.tmpdir(), `positron-python-${Math.floor(Math.random() * 100000)}`),
		mocha: { timeout: 60_000 }
	}
	// ...

to .vscode-test.js to run the tests with yarn test-extension -l positron-python

Co-authored-by: Nick Strayer <[email protected]>
Signed-off-by: Wasim Lorgat <[email protected]>
@seeM
Copy link
Contributor Author

seeM commented Nov 9, 2024

Ah, the Python extension's tests are a bit complex and run differently to the others. You can run the unit tests with yarn test:unittests from the extension folder.

@seeM seeM merged commit 83d5161 into main Nov 9, 2024
23 checks passed
@seeM seeM deleted the 5305-fix-changing-notebook-python-interpreter branch November 9, 2024 11:21
@github-actions github-actions bot locked and limited conversation to collaborators Nov 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants