mirror of
https://github.com/microsoft/pyright.git
synced 2024-08-16 11:20:22 +03:00
Fixed subtle bug in a test case that was resulting in a long hang during unit tests.
This commit is contained in:
parent
0df185ebd4
commit
add2193101
@ -522,7 +522,7 @@ export class AnalyzerService {
|
||||
const optionRoot = commandLineOptions.executionRoot;
|
||||
const executionRootUri = Uri.is(optionRoot)
|
||||
? optionRoot
|
||||
: isString(optionRoot)
|
||||
: isString(optionRoot) && optionRoot.length > 0
|
||||
? Uri.file(optionRoot, this.serviceProvider, /* checkRelative */ true)
|
||||
: Uri.defaultWorkspace(this.serviceProvider);
|
||||
|
||||
|
@ -323,7 +323,7 @@ test('BasicPyprojectTomlParsing', () => {
|
||||
test('FindFilesInMemoryOnly', () => {
|
||||
const cwd = normalizePath(process.cwd());
|
||||
const service = createAnalyzer();
|
||||
const commandLineOptions = new CommandLineOptions('', /* fromVsCodeExtension */ true);
|
||||
const commandLineOptions = new CommandLineOptions(undefined, /* fromVsCodeExtension */ true);
|
||||
// Force a lookup of the typeshed path. This causes us to try and generate a module path for the untitled file.
|
||||
commandLineOptions.typeshedPath = combinePaths(cwd, 'src', 'tests', 'samples');
|
||||
service.setOptions(commandLineOptions);
|
||||
|
Loading…
Reference in New Issue
Block a user