posit-dev / positron

Positron, a next-generation data science IDE
https://positron.posit.co
Other
2.82k stars 91 forks source link

Fix changing notebook Python intepreter also changing console #5307

Closed seeM closed 1 week ago

seeM commented 2 weeks ago

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.

nstrayer commented 1 week ago

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

seeM commented 1 week ago

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.