Skip to content

MATLAB extension blocks non-MATLAB tests in Test Explorer #205

@tpajenkamp-dspace

Description

@tpajenkamp-dspace

Describe the bug
When using the VSCode Test Explorer in mixed-code workspace to run Python pytest tests, a connection to MATLAB is created that blocks the tests from finishing.
I suspect this is not limited to Python/pytest, but I encountered the issue in this setup.
This only happens if MATLAB.startDebuggerAutomatically is enabled.

To Reproduce
Steps to reproduce the behavior:

  1. Create a VS Code folder or workspace that has both MATLAB and Python code.
  2. Create a pylint test that is unrelated to MATLAB, e.g., test_Pytest.py:
    test_foo():
        assert True
  3. Enable pytest tests and make sure the test is shown in the Test Explorer.
  4. Perform an action that establishes a connection to MATLAB (e.g., open an M file or run an M file depending on the extension settings).
  5. In the Test Explorer, run "Debug Test" for the pytest test.
  6. Expected behavior The pytest test runs and the verdict is shown as green checkmark in the Test Explorer.

Screenshots
The test execution does not finish

Image

Go to "Run and Debug" and disconnect MATLAB in the call stack:

Image

Now the Test Explorer shows the verdict.

Useful Information

  • OS Version: Windows 10 Pro 22H2
  • VS Code Version: 1.96.4
  • MATLAB Extension Version: 1.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions