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

Cannot have pytest and flash file to microcontroller run in context menu at same time #246

Open
randomsmith9 opened this issue Aug 23, 2023 · 0 comments

Comments

@randomsmith9
Copy link

Raising here as per comment in https://intellij-support.jetbrains.com/hc/en-us/community/posts/13220957077522-How-to-change-default-runner-is-stuck-on-micropython-plugin

I have a python project in Intellij and have pytest and micropython plugins

After running some unit tests as normal, I then ran the micropython flash folder run configuration. (flash means copy files onto a microcontroller that is attached)
Raising this here as per comment in https://intellij-support.jetbrains.com/hc/en-us/community/posts/13220957077522-How-to-change-default-runner-is-stuck-on-micropython-plugin
Now when I click on the green triangle to run some test, it wants to flash them instead.

I have tried removing all the run configuration but the default option is to micropython flash.

But want to right click on a test and say run as pytest but that doesn't appear. When I right click on say test_xxx, I see "Run Flash 'test_xxx.py'" but not "Run pytest test_xxx.py"

what do I need to do to have pytest show as a runnable option?

EDIT 1: I was following a JetBrains post that said to edit the module of the project to ensure it was python

then add the micropython facet. On doing this, I could flash a microcontroller but lose the option to run unit tests.

If I remove the micropython facet from the project, I can run pytest unit tests again.

How do I get the ability to have both options appear in context menu?

IntelliJ IDEA 2023.2 (Community Edition)
Build #IC-232.8660.185, built on July 26, 2023
Runtime version: 17.0.7+7-b1000.6 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11.0
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 20
Registry:
debugger.new.tool.window.layout=true
ide.experimental.ui=true

Non-Bundled Plugins:
com.jetbrains.packagesearch.intellij-plugin (232.8660.142)
PythonCore (232.8660.185)
intellij-micropython (1.4.1-2023.2)

Kotlin: 232-1.9.0-IJ8660.185

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

1 participant