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

Updated _find_left_bracket function used in pytest discovery to fix bug #17955

Closed

Conversation

scwilbanks
Copy link

@scwilbanks scwilbanks commented Nov 7, 2021

Fix for #17954, #17951.

Instead of assuming an equal number of open and closed brackets as the current function does, this change assumes that the first open bracket of the last double colon "::" will be the bracket it is looking for. Since the testname will correspond to a python function, which cannot contain open brackets, the first open bracket must be it.

@ghost
Copy link

ghost commented Nov 7, 2021

CLA assistant check
All CLA requirements met.

@scwilbanks
Copy link
Author

I ran black to fix the linting error, but I don't know why the venv check failed.

I also see a previously approved pull request (#17881) that already solved the problem in a different and probably better way.

@karthiknadig
Copy link
Member

@scwilbanks Thanks for the PR. I think we want to go with the fix here #17881. The venv test failed due to pipenv end of 2.7 support. Not related to this change.

Can you test with the build from the PR #17881 and confirm that it works?
This is the build from that PR https://github.com/microsoft/vscode-python/suites/4250577747/artifacts/110667889

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants