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)

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 ''" but not "Run pytest"

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

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


Please report it to the plugin's issue tracker, the team will look into it.
At the moment, the context menu cannot be configured to show both options, unfortunately.