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

Unittest args doesn't support -t flag #5721

Closed
Fraggle opened this issue May 22, 2019 · 5 comments
Closed

Unittest args doesn't support -t flag #5721

Fraggle opened this issue May 22, 2019 · 5 comments
Assignees
Labels
area-testing bug Issue identified by VS Code Team member as probable bug

Comments

@Fraggle
Copy link

Fraggle commented May 22, 2019

This issue: #2162 was closed is was considered a duplicate of another issue.

However, I still can't make vs code discover our tests right now as the "-t" flag is still not supported as a python.testing.unittestArgs.

I confirm that using a terminal to execute the same discovery command but with the -t flag specified works when it doesn't without.

My request is to re-open the issue and add support for -t flag.

@ghost ghost added the triage-needed Needs assignment to the proper sub-team label May 22, 2019
@Fraggle Fraggle changed the title Python test discovery unittest, this issue should be re-opened https://github.com/Microsoft/vscode-python/issues/2162 Python test discovery unittest, issue #2162 should be re-opened May 22, 2019
@Fraggle
Copy link
Author

Fraggle commented May 22, 2019

I digged into the code and I think the fix is relatively easy, actually -t is a "knowOptions" for unittests, however:

Here, when discovery is triggered:
https://github.com/microsoft/vscode-python/blob/master/src/client/testing/unittest/services/discoveryService.ts#L49

There is a third optional argument top_level_dir that should be passed if -t has been specified in the unittestArgs

See https://docs.python.org/2/library/unittest.html#unittest.TestLoader.discover and https://docs.python.org/3/library/unittest.html#unittest.TestLoader.discover

I can provide a PR with the necessary changes that should be limited to https://github.com/microsoft/vscode-python/blob/master/src/client/testing/unittest/services/discoveryService.ts.

@DonJayamanne
Copy link

Thanks for the investigation, please do provide a PR.

@DonJayamanne DonJayamanne added area-testing needs PR bug Issue identified by VS Code Team member as probable bug labels May 22, 2019
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label May 22, 2019
@luabud luabud changed the title Python test discovery unittest, issue #2162 should be re-opened Unittest args doesn't support -t flag Sep 15, 2020
@ggirard07
Copy link

@Fraggle any issue making this more difficult than previously anticipated?

@karrtikr
Copy link

karrtikr commented Oct 23, 2021

We fixed a lot of related code, is this now fixed in the latest version of the extension?

cc @karthiknadig

@eleanorjboyd
Copy link
Member

Hi! From my understanding of the extension right now the -t flag can be passed but is not respected. I have been working on this issue and will update progress there #21267.

Lets move to this other issue to consolidate the discussion, thanks!

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

6 participants