-
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
Tests for PYTHONSTARTUP setting #24145
Conversation
Need to resolve: Keep running into context.environmentVariableCollection.replace is not a function error: Tried to follow logic in vscode-python/src/test/interpreters/activation/terminalEnvVarCollectionService.unit.test.ts Line 82 in af2aa6e
It seems that problem is I cannot access environmentVariableCollection from IExtensionContext ONLY when I'm in the test file. |
Note: All Three approach of trying to setup/mock EnvironmentCollection.replace is giving "Not a function error"
Edit:
is a wrong way to set up when using typemoq. It may be right for ts-mockito but not for typemoq. |
@@ -8,7 +8,7 @@ import { IVariableDescription } from '../../client/repl/variables/types'; | |||
import { VariablesProvider } from '../../client/repl/variables/variablesProvider'; | |||
import { VariableRequester } from '../../client/repl/variables/variableRequester'; | |||
|
|||
suite.only('ReplVariablesProvider', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a hygiene rule in core to prevent this slipping in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good idea and I've made item on this: #24161
I see "local/code-no-test-only": "error", from vscode. Not sure if that local/code is something vscode repository specific, but I think something like:
{
"plugins": ["mocha"],
"rules": {
"mocha/no-exclusive-tests": "error"
}
}
works too
Adding test for: #24111