Repository navigation
Enable Pytest Rewrite to Users #20086
Description
Activity
- addedfeature-requestRequest for new features or functionalityRequest for new features or functionality
on Oct 26, 2022 - addedtriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
on Oct 26, 2022 - added and removedtriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
on Oct 26, 2022 is there a way for users to enable this themselves if the experiment isn't enabled for them? i wrote a pytest hook that relies on the new test adapter (pytest-dev/pytest-xdist#853 (comment)) and it would be nice if i could set something in
.vscode/settings.jsonto enable it for everyone in my team.edit: i just found
python.experiments.optInto, but it looks like that can only be configured on the user'ssettings.jsonand not the workspace oneeleanorjboyd commented
on Mar 27, 2024 MemberAuthorMore actionsDetachHead, the experiment should be enabled for all users by default- do you have a setting that might turn on this default behavior?
- addedinfo-neededIssue requires more information from posterIssue requires more information from poster
on Mar 27, 2024 looks like it was because i have
"telemetry.telemetryLevel"set to"off"Reacted by Eleanor BoydEleanor Boyd (@eleanorjboyd) do experiments work differently on the insiders version of vscode? the
pythonTestAdapterexperiment seems to be disabled by default, even though i havetelemetry.telemetryLevelset toalleleanorjboyd commented
on Apr 15, 2024 MemberAuthorMore actionsIt should be enabled for everyone on both stable and insiders. To confirm both your user and workspace settings do not reference anything about experiments?
yep, no experiments or telemetry settings have been changed from the defaults. same thing happens on a colleague's PC with a fresh install. i even deleted everything in both my user and workspace
settings.jsonfiles just to be sureeleanorjboyd commented
on Apr 16, 2024 MemberAuthorMore actionsLuciana Abud (@luabud) could you take a look at this?
Hmm it should be enabled on both Insiders and Public. A couple of things to check:
- Make sure you have the latest VS Code Insiders version (1.89.0-insider) and the latest Python extension version (v2024.4.X or v2024.5.XXXXXXX)
- Make sure telemetry isn't disabled (which you already did)
- Make sure experiments are not disabled (i.e. there's no
"workbench.enableExperiments":falseor"python.experiments.enabled":falseset in User, Workspace, Remote or Profile settings)
I am also curious if there are any other experiments enabled, or if it's just this one that is disabled? You should be able to check this by opening the Python output channel ("Python: Show Output" command in the command palette) and looking into the first few lines there:
- Make sure you have the latest VS Code Insiders version (1.89.0-insider) and the latest Python extension version (v2024.4.X or v2024.5.XXXXXXX)
yep, i'm on vscode
1.89.0-insiderand python extension2024.5.11021008 (pre-release)- Make sure telemetry isn't disabled (which you already did)
- Make sure experiments are not disabled (i.e. there's no
"workbench.enableExperiments":falseor"python.experiments.enabled":falseset in User, Workspace, Remote or Profile settings)
not sure where to find profile settings, but here's some screenshots of my user settings to show that there's no "modified elsewhere" messages on any of these settings:
I am also curious if there are any other experiments enabled, or if it's just this one that is disabled? You should be able to check this by opening the Python output channel ("Python: Show Output" command in the command palette) and looking into the first few lines there:
no experiments showed up in the log, this is all i see:
that's definitely unexpected. What happens if you explicitly add
"python.experiments.optInto": [ "pythonTestAdapter", ],to your settings?And you've downloaded VS Code from the official website, right?
that's definitely unexpected. What happens if you explicitly add
"python.experiments.optInto": [ "pythonTestAdapter", ],to your settings?it works when i do that
And you've downloaded VS Code from the official website, right?
yep
also happened on a different colleague's PC with the stable version of vscode (1.88.1) and the stable version of the python extension (2024.4.1).
i checked all the same things on their PC. telemetry is enabled, no experiment settings have been changed, yet no experiments were active in the python output terminal.
I've done some digging and the only hypothesis I could come up with is a mis configuration on our end. I made some changes so if that was the culprit, it should be fixed now. Would you mind removing the opt into setting, reloading VS Code and checking your Python Output to see if you have the experiment enabled?
If that didn't work, then I think #23241 is the fastest workaround we can provide for this issue indeed (cc Karthik Nadig (@karthiknadig))
I've done some digging and the only hypothesis I could come up with is a mis configuration on our end. I made some changes so if that was the culprit, it should be fixed now. Would you mind removing the opt into setting, reloading VS Code and checking your Python Output to see if you have the experiment enabled?
didn't work, still no experiments enabled for me on vscode insiders
If that didn't work, then I think #23241 is the fastest workaround we can provide for this issue indeed (cc Karthik Nadig (@karthiknadig))
in that case, i went ahead and made a PR: #23267
Hey Eleanor Boyd (@eleanorjboyd), this issue might need further attention.
Eleanor Boyd (@eleanorjboyd), you can help us out by closing this issue if the problem no longer exists, or adding more information.
- removedinfo-neededIssue requires more information from posterIssue requires more information from poster
on Jun 7, 2024




Enable the pytest rewrite code and disable the old pytest coding method. This may also include doing the same for unittests but for reduced load these two might need to be at separate times. Dependencies between the two workflows should be analyzed to determine a best release schedule.