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 ERROR: File Not Found Error #8222

Closed
YoDaMa opened this issue Oct 25, 2019 · 6 comments
Closed

Test ERROR: File Not Found Error #8222

YoDaMa opened this issue Oct 25, 2019 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@YoDaMa
Copy link

YoDaMa commented Oct 25, 2019

Environment data

  • VS Code version: 1.39.2 (user setup)
  • Extension version (available under the Extensions sidebar): 2019.10.44104
  • OS and version: Windows_NT x64 10.0.18363
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.0
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
  • Relevant/affected Python packages and their versions: pytest

Expected behaviour

Pytest Tests work.

Actual behaviour

If I set the top level directory for the Python Test extension to azure-iot-device for pytest, the python extension will be able to discover tests without erroring out, but upon debugging I will get an Error:

ERROR: file not found: ./azure-iot-device/tests/common/pipeline/test_pipeline_stages_base.py::TestEnsureConnectionStageUnknownEvents::test_uses_background_exception_handler[IncomingMQTTMessageEvent]

The issue is that error is cryptic. Running tests in the command prompt there is no error as such. Where is the error coming from? is it from generated code? How to i fix it?

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

https://gist.github.com/YoDaMa/9b25b078cf4e262ab61f275537bfb37f

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

============================= test session starts =============================
platform win32 -- Python 3.7.0, pytest-5.2.1, py-1.8.0, pluggy-0.13.0
rootdir: e:\GitRepos\Python\custom_user_agent, inifile: pytest.ini
plugins: asyncio-0.10.0, cov-2.8.1, mock-1.10.4, testdox-1.2.0, timeout-1.3.3
timeout: 20.0s
timeout method: thread
timeout func_only: False
collected 0 items

- generated xml file: C:\Users\yomaguir\AppData\Local\Temp\tmp-12232X4OzggdFWp6w.xml -
============================ no tests ran in 0.09s ============================
ERROR: file not found: ./azure-iot-device/tests/common/pipeline/test_pipeline_stages_base.py::TestEnsureConnectionStageUnknownEvents::test_uses_background_exception_handler[IncomingMQTTMessageEvent]
@YoDaMa YoDaMa added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Oct 25, 2019
@brettcannon brettcannon added the info-needed Issue requires more information from poster label Oct 28, 2019
@brettcannon
Copy link
Member

Are you using just the Python extension for VS Code or do you have another Python extension installed (your comment about the "Python Test extension" suggests you have more than one). If you have another Python extension then please disable the other ones to make sure they are not interfering with our extension.

And when you said "running tests in the command prompt there is no error", is that with the same command the extension uses to execute your tests (which you can see in the Output panel), or are you creating the command yourself? If the latter, please try using the command we use to see if it reproduces the problem.

@YoDaMa
Copy link
Author

YoDaMa commented Oct 28, 2019

Specifically the Python Extension for VS Code.

image

@YoDaMa
Copy link
Author

YoDaMa commented Oct 28, 2019

@brettcannon it's not clear from the logs what specifically the extension is running so I can repro what you are asking. I've included my OUTPUT as a gist above. Can you point me at the line I can paste into my own command prompt to run?

That being said, I'm running pyest in my top level folder, which is generic, and generally how you run pytest tests... As in literally:

$ cd azure-iot-sdk-python/azure-iot-device
$ pytest

@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Oct 28, 2019
@karthiknadig karthiknadig removed the info-needed Issue requires more information from poster label Oct 28, 2019
@brettcannon
Copy link
Member

@YoDaMa I thought we printed the lint in the Output panel for each test log run, but if that's not the case then we will have it under the general "Python" tab of the Output panel.

@kimadeline
Copy link

Hi @YoDaMa 👋

Could you also copy here the content of the terminal when you run pytest . from the e:\GitRepos\Python\custom_user_agent folder (it's the rootdir folder in your log snippet above)?

Thanks!

@brettcannon
Copy link
Member

Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on then we will be happy to re-open this issue to pick up where we left off.

@ghost ghost removed the triage label Jan 2, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants