Skip to content

Single test run fails if there is an import error in unrelated file #15147

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

Closed
sjanota opened this issue Jan 14, 2021 · 1 comment
Closed

Single test run fails if there is an import error in unrelated file #15147

sjanota opened this issue Jan 14, 2021 · 1 comment
Labels
area-testing bug Issue identified by VS Code Team member as probable bug

Comments

@sjanota
Copy link

sjanota commented Jan 14, 2021

Environment data

  • VS Code version: 1.52.1
  • Extension version (available under the Extensions sidebar): v2020.12.424452561
  • OS and version: macOS 10.15.7
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.6
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
  • Relevant/affected Python packages and their versions: XXX
  • Relevant/affected Python-related VS Code extensions and their versions: XXX
  • Value of the python.languageServer setting: Pylance

[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (python.languageServer: 'Microsoft'), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]

Expected behaviour

Discovered test should be run without even if there is problem in different test, or at least error should be reported.

Actual behaviour

Even though tests are discovered in testing tab, running single tests causes message "No tests ran, please check the configuration settings for the tests." to appear. No tests are run.

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

I can't reproduce it outside our codebase, which has a lot of things glued on duck tape and Unittest discovery goes crazy, but I think here it is just a problem with error reporting here.

Logs

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

Unhandled exception in thread started by 

@sjanota sjanota added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Jan 14, 2021
@karthiknadig karthiknadig self-assigned this Jan 14, 2021
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Jan 14, 2021
@karthiknadig karthiknadig added area-testing triage-needed Needs assignment to the proper sub-team and removed triage-needed Needs assignment to the proper sub-team labels Jan 14, 2021
@karthiknadig karthiknadig removed their assignment Aug 6, 2021
@github-actions github-actions bot removed the needs PR label Aug 9, 2022
@karrtikr karrtikr added the needs PR Ready to be worked on label Aug 9, 2022
@eleanorjboyd
Copy link
Member

Hello! Closing as this is the same as this issue, which we are getting to this iteration! I will be fixing this for pytest but if you actually want this for unittest please comment and I will reopen. Thanks!

@eleanorjboyd eleanorjboyd closed this as not planned Won't fix, can't repro, duplicate, stale Jul 7, 2023
@github-actions github-actions bot removed the needs PR Ready to be worked on label Jul 7, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 7, 2023
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

5 participants