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

EIB-Python extension in VSCode and unitTest functionalities not working #27

Open
saraneem opened this issue Mar 18, 2021 · 2 comments
Open

Comments

@saraneem
Copy link

From the client:

It looks like some of the unit test functionalities of the extension "Python" for the VSCode Editor included in Anaconda sessions are not working.

The View "Test" is not available and the function "Python: Discover Tests" do nothing.

I could successfully get that view and use that function on my local workstation with the "Python" extension. However I noticed that the version is not the same and the one included in Anaconda is older, so maybe an update might fix the issues?

Please see the screenshots - One with "annotations" was taken after executing "Python: Configure Tests".
anacondaEditor_NoAnnotations
anacondaEditor_NoTestView
LocalWorkstation_1
LocalWorkstation_2

@AlbertDeFusco
Copy link
Collaborator

I will investigate. Did you install pytest in your project on AE5?

@AlbertDeFusco
Copy link
Collaborator

Ah! So I got it working by enabling pytest in the VSCode settings.

The user can enable any or all of the testing frameworks by creating an AE5 secret called vscode_settings (lower case) and include the following. These settings will then be applied when the editor session starts.

{
    "python.testing.unittestEnabled": true
}

This user may wish to enable other testing frameworks as well

{
    "python.testing.unittestEnabled": true,
    "python.testing.nosetestsEnabled": true,
    "python.testing.pytestEnabled": true
}

The user can then continue to use this secret to customize their VSCode settings. This secret must be well formatted JSON or it will not apply the settings. Above you'll see that each line is indented 4 spaces.

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

No branches or pull requests

2 participants