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

Test result not found for: xxxxxx in ssh remote session and workspace folder #17343

Closed
jzazo opened this issue Sep 9, 2021 · 9 comments
Closed
Assignees
Labels
area-testing bug Issue identified by VS Code Team member as probable bug

Comments

@jzazo
Copy link

jzazo commented Sep 9, 2021

Environment data

  • VS Code version: 1.60.0
  • Extension version: remote-ssh v0.65.7
  • OS and version: Ubuntu 20.04
  • Python version: Python 3.8.5 (pyenv 1.2.21)
  • Type of virtual environment used: pipenv, version 2018.11.26
  • Relevant/affected Python packages and their versions: pytest 6.2.5
  • Relevant/affected Python-related VS Code extensions and their versions: worspace configuration
  • Value of the python.languageServer setting: Pylance

Expected behaviour

I run pytest in my repo where each folder is configured as a workspace. I expect that the Testing tab reflects the outcome of the pytest results.

Actual behaviour

I get error displayed Test result not found for: ./test/python/example_test/test_example.py::test_example1, even though the test was successful.

Apparently vscode cannot find tests results from workspace folder. This was working fine before August 2021's vscode release.

Steps to reproduce:

I have a repo structure as follows:

somerepo/:
  example1/
    .vscode/
      settings.json
    src/python/example/
      __init__.py
      example.py
    test/python/test_example/
      __init__.py
      test_example.py
  somerepo.code-workspace
  .envrc
  Pipfile
  Pipfile.lock

The contents of somerepo.code-workspace are:

{
    "folders": [
        {"path": "."},
        {"path": "example1"}
    ],
    "settings": {
        "files.exclude":{
            "example1": true
        },
        "python.languageServer": "Pylance"
    }
}

The contents of example1/.vscode/settings.json are:

{
    "python.envFile": "${workspaceFolder}/.envrc",
    "python.analysis.extraPaths": ["./src/python"],
    "python.pythonPath": "/home/javier/.local/share/virtualenvs/example1-CvWCFCrt/bin/python",
    "python.testing.pytestArgs": ["test"],
    "python.testing.unittestEnabled": false,
    "python.testing.pytestEnabled": true,
}

The contents of .envrc are:

layout pipenv

The contents of Pipfile are:

[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
pytest = "*"

[packages]

[requires]
python_version = "3.8.5"

The contents of Pipfile.lock are generated by running pipenv install --dev.
The contents of example1/src/python/example/example.py are:

def hello():
    print("hello")

The contents of example1/test/python/example_test/test_example.py are:

def test_example1():
    assert True
@jzazo jzazo added bug Issue identified by VS Code Team member as probable bug triage-needed Needs assignment to the proper sub-team labels Sep 9, 2021
@karthiknadig
Copy link
Member

This should be fixed in, please give that a try. https://github.com/microsoft/vscode-python/suites/3720107868/artifacts/90996691
It will be released soon.

@karthiknadig karthiknadig added area-testing and removed triage-needed Needs assignment to the proper sub-team labels Sep 9, 2021
@karthiknadig karthiknadig self-assigned this Sep 9, 2021
@karthiknadig karthiknadig added this to the August Recovery milestone Sep 9, 2021
@karthiknadig
Copy link
Member

Duplicate of #17270 fixed via #17275

@jzazo
Copy link
Author

jzazo commented Sep 9, 2021

I still get the same error after installing the extension you linked.

@jzazo
Copy link
Author

jzazo commented Sep 9, 2021

When I hit the debug button of a test, the Debug Console does not even show output anymore, and it was working before the patch.

@karthiknadig
Copy link
Member

@jzazo
Copy link
Author

jzazo commented Sep 9, 2021

seems to be working now, thanks.

@jzazo
Copy link
Author

jzazo commented Sep 13, 2021

Running tests seem to be working fine, but debugging tests don't work. If I hit debug a test, a wheel keeps spinning without end. Already reported or new?

@karthiknadig
Copy link
Member

@jzazo That is a new issue please file a separate bug.

@jzazo
Copy link
Author

jzazo commented Sep 13, 2021

Thanks, I created the following bug report

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-testing bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants