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

Code action test should wait for diagnostics. #66

Closed
anu-ka opened this issue Oct 21, 2022 · 3 comments
Closed

Code action test should wait for diagnostics. #66

anu-ka opened this issue Oct 21, 2022 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug good first issue needs PR

Comments

@anu-ka
Copy link
Contributor

anu-ka commented Oct 21, 2022

The code action test currently opens the file but does not collect diagnostics.

@karthiknadig karthiknadig self-assigned this Oct 22, 2022
@karthiknadig karthiknadig added the bug Issue identified by VS Code Team member as probable bug label Oct 22, 2022
@karthiknadig
Copy link
Member

karthiknadig commented Oct 22, 2022

The code actions tests should get diagnostics similar to this:

done = Event()
def _handler(params):
nonlocal actual
actual = params
done.set()
ls_session.set_notification_callback(session.PUBLISH_DIAGNOSTICS, _handler)
ls_session.notify_did_open(
{
"textDocument": {
"uri": TEST_FILE_URI,
"languageId": "python",
"version": 1,
"text": contents,
}
}
)
# wait for some time to receive all notifications
done.wait(TIMEOUT)

Once we have the diagnostics, for each code action test we filter it to that particular code. And use that filtered list in code actions request.

@jessienguyen2312
Copy link
Contributor

Hi, I'm Jessie! can I work on this issue?

@msp112
Copy link

msp112 commented Sep 22, 2023

I'm Melissa! I would like to work on this issue with her

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug good first issue needs PR
Projects
None yet
Development

No branches or pull requests

5 participants