Skip to content

Commit 8d481ec

Browse files
fix tests
1 parent efcbd98 commit 8d481ec

File tree

3 files changed

+0
-142
lines changed

3 files changed

+0
-142
lines changed

src/test/debugger/extension/configuration/resolvers/attach.unit.test.ts

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -496,74 +496,5 @@ getInfoPerOS().forEach(([osName, osType, path]) => {
496496
expect(debugConfig).to.have.property('clientOS', getClientOS());
497497
expect(debugConfig).to.have.property('debugOptions').to.be.deep.equal(expectedDebugOptions);
498498
});
499-
500-
const testsForJustMyCode = [
501-
{
502-
justMyCode: false,
503-
debugStdLib: true,
504-
expectedResult: false,
505-
},
506-
{
507-
justMyCode: false,
508-
debugStdLib: false,
509-
expectedResult: false,
510-
},
511-
{
512-
justMyCode: false,
513-
debugStdLib: undefined,
514-
expectedResult: false,
515-
},
516-
{
517-
justMyCode: true,
518-
debugStdLib: false,
519-
expectedResult: true,
520-
},
521-
{
522-
justMyCode: true,
523-
debugStdLib: true,
524-
expectedResult: true,
525-
},
526-
{
527-
justMyCode: true,
528-
debugStdLib: undefined,
529-
expectedResult: true,
530-
},
531-
{
532-
justMyCode: undefined,
533-
debugStdLib: false,
534-
expectedResult: true,
535-
},
536-
{
537-
justMyCode: undefined,
538-
debugStdLib: true,
539-
expectedResult: false,
540-
},
541-
{
542-
justMyCode: undefined,
543-
debugStdLib: undefined,
544-
expectedResult: true,
545-
},
546-
];
547-
test('Ensure justMyCode property is correctly derived from debugStdLib', async () => {
548-
const activeFile = 'xyz.py';
549-
const workspaceFolder = createMoqWorkspaceFolder(__dirname);
550-
setupActiveEditor(activeFile, PYTHON_LANGUAGE);
551-
const defaultWorkspace = path.join('usr', 'desktop');
552-
setupWorkspaces([defaultWorkspace]);
553-
554-
const debugOptions = debugOptionsAvailable
555-
.slice()
556-
.concat(DebugOptions.Jinja, DebugOptions.Sudo) as DebugOptions[];
557-
558-
testsForJustMyCode.forEach(async (testParams) => {
559-
const debugConfig = await resolveDebugConfiguration(workspaceFolder, {
560-
...attach,
561-
debugOptions,
562-
justMyCode: testParams.justMyCode,
563-
debugStdLib: testParams.debugStdLib,
564-
});
565-
expect(debugConfig).to.have.property('justMyCode', testParams.expectedResult);
566-
});
567-
});
568499
});
569500
});

src/test/debugger/extension/configuration/resolvers/launch.unit.test.ts

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,6 @@ getInfoPerOS().forEach(([osName, osType, path]) => {
769769
expect(debugConfig).to.have.property('justMyCode', false);
770770
expect(debugConfig).to.have.property('debugOptions');
771771
const expectedOptions = [
772-
DebugOptions.DebugStdLib,
773772
DebugOptions.ShowReturnValue,
774773
DebugOptions.RedirectOutput,
775774
];
@@ -779,69 +778,6 @@ getInfoPerOS().forEach(([osName, osType, path]) => {
779778
expect((debugConfig as DebugConfiguration).debugOptions).to.be.deep.equal(expectedOptions);
780779
});
781780

782-
const testsForJustMyCode = [
783-
{
784-
justMyCode: false,
785-
debugStdLib: true,
786-
expectedResult: false,
787-
},
788-
{
789-
justMyCode: false,
790-
debugStdLib: false,
791-
expectedResult: false,
792-
},
793-
{
794-
justMyCode: false,
795-
debugStdLib: undefined,
796-
expectedResult: false,
797-
},
798-
{
799-
justMyCode: true,
800-
debugStdLib: false,
801-
expectedResult: true,
802-
},
803-
{
804-
justMyCode: true,
805-
debugStdLib: true,
806-
expectedResult: true,
807-
},
808-
{
809-
justMyCode: true,
810-
debugStdLib: undefined,
811-
expectedResult: true,
812-
},
813-
{
814-
justMyCode: undefined,
815-
debugStdLib: false,
816-
expectedResult: true,
817-
},
818-
{
819-
justMyCode: undefined,
820-
debugStdLib: true,
821-
expectedResult: false,
822-
},
823-
{
824-
justMyCode: undefined,
825-
debugStdLib: undefined,
826-
expectedResult: true,
827-
},
828-
];
829-
test('Ensure justMyCode property is correctly derived from debugStdLib', async () => {
830-
const pythonPath = `PythonPath_${new Date().toString()}`;
831-
const workspaceFolder = createMoqWorkspaceFolder(__dirname);
832-
const pythonFile = 'xyz.py';
833-
setupIoc(pythonPath);
834-
setupActiveEditor(pythonFile, PYTHON_LANGUAGE);
835-
testsForJustMyCode.forEach(async (testParams) => {
836-
const debugConfig = await resolveDebugConfiguration(workspaceFolder, {
837-
...launch,
838-
debugStdLib: testParams.debugStdLib,
839-
justMyCode: testParams.justMyCode,
840-
});
841-
expect(debugConfig).to.have.property('justMyCode', testParams.expectedResult);
842-
});
843-
});
844-
845781
const testsForRedirectOutput = [
846782
{
847783
console: 'internalConsole',

src/test/testing/common/debugLauncher.unit.test.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -234,13 +234,6 @@ suite('Unit Tests - Debug Launcher', () => {
234234
}
235235
expected.workspaceFolder = workspaceFolders[0].uri.fsPath;
236236
expected.debugOptions = [];
237-
if (expected.justMyCode === undefined) {
238-
// Populate justMyCode using debugStdLib
239-
expected.justMyCode = !expected.debugStdLib;
240-
}
241-
if (!expected.justMyCode) {
242-
expected.debugOptions.push(DebugOptions.DebugStdLib);
243-
}
244237
if (expected.stopOnEntry) {
245238
expected.debugOptions.push(DebugOptions.StopOnEntry);
246239
}
@@ -379,7 +372,6 @@ suite('Unit Tests - Debug Launcher', () => {
379372
envFile: 'some/dir/.env',
380373
redirectOutput: false,
381374
debugStdLib: true,
382-
justMyCode: false,
383375
// added by LaunchConfigurationResolver:
384376
internalConsoleOptions: 'neverOpen',
385377
subProcess: true,
@@ -399,7 +391,6 @@ suite('Unit Tests - Debug Launcher', () => {
399391
envFile: expected.envFile,
400392
redirectOutput: expected.redirectOutput,
401393
debugStdLib: expected.debugStdLib,
402-
justMyCode: undefined,
403394
},
404395
]);
405396

0 commit comments

Comments
 (0)