-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Unable to navigate to test function #11866
Comments
Just now navigation to test functions works fine and I don't know why. The only I know is that it will stop to work after some time. |
Simply restarted vscode, and this stopped to work. |
Unfortunately I am unable to reproduce this issue. Please paste the Python output channel mentioned in the issue template. We fetch all the symbols in the doc, and find the test method name within it, if not found, we throw the error. The command we use to fetch the symbols should be present there. Please try running that command manually in terminal and check if you see the name of the function. For instance, in my case it was
You can try a couple of things as a workaround,
Thanks for cooperating! |
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Can you please paste the contents of
this step in |
Please open this file
Answer here says this could help solve the issue. |
Sorry for long delay. I tested
Many thanks for this tip! I changed in with open(sys.argv[1], "r") as source: to with open(sys.argv[1], "r", encoding='utf8') as source: and now all works fine!!! ^_^ 👍 Also, according this, it seems to me we can use utf-8 safely in |
Great😀 Glad it worked for you. We'll switch to |
I just found that navigation doesn't work for parametrized function like this:
In other cases all works fine. I don't see any errors in Python console. The only error I see in Chrome Devtools console:
It seems to me, that such kind of navigation isn't implemented yet. |
But when I click to navigate to function |
This looks like a separate issue, please open up a new one. |
This should be fixed by #16769 |
Environment data
1.45.1 (user setup)
2020.5.78807
Windows 10 x64 (17763.1217)
Python 3.7.7 x64 (conda 4.8.3)
conda
pytest 5.3.5
Python 2020.5.78807
"python.jediEnabled"
set to; more info How to update the language server to the latest stable version #3977):Jedi Enabled = True; LanguageServer.0.5.45 (updated manually)
python.languageServer
setting:Microsoft (default)
.Expected behaviour
I press here on "Test" tab:
I'd like to see a line
def test_01__...
in my code editor.Actual behaviour
Nothing happens. I pressed button "Discover tests" multiple times, but this didn't help me.
But...
Then I enabled source maps and got the following:
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
Sorry, I don't have such file for now.
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
; turn on source maps to make any tracebacks be useful by runningEnable source map support for extension debugging
)The text was updated successfully, but these errors were encountered: