@@ -677,7 +677,7 @@ suite('End to End Tests: test adapters', () => {
677677 } ) ;
678678 test ( 'pytest execution adapter small workspace with correct output' , async ( ) => {
679679 // result resolver and saved data for assertions
680- resultResolver = new PythonResultResolver ( testController , unittestProvider , workspaceUri ) ;
680+ resultResolver = new PythonResultResolver ( testController , pytestProvider , workspaceUri ) ;
681681 let callCount = 0 ;
682682 let failureOccurred = false ;
683683 let failureMsg = '' ;
@@ -874,7 +874,7 @@ suite('End to End Tests: test adapters', () => {
874874 } ) ;
875875 test ( 'pytest execution adapter large workspace' , async ( ) => {
876876 // result resolver and saved data for assertions
877- resultResolver = new PythonResultResolver ( testController , unittestProvider , workspaceUri ) ;
877+ resultResolver = new PythonResultResolver ( testController , pytestProvider , workspaceUri ) ;
878878 let callCount = 0 ;
879879 let failureOccurred = false ;
880880 let failureMsg = '' ;
@@ -1061,83 +1061,6 @@ suite('End to End Tests: test adapters', () => {
10611061 assert . strictEqual ( failureOccurred , false , failureMsg ) ;
10621062 } ) ;
10631063 } ) ;
1064- // test('unittest execution adapter seg fault error handling', async () => {
1065- // resultResolver = new PythonResultResolver(testController, unittestProvider, workspaceUri);
1066- // let callCount = 0;
1067- // let failureOccurred = false;
1068- // let failureMsg = '';
1069- // resultResolver._resolveExecution = async (data, _token?) => {
1070- // // do the following asserts for each time resolveExecution is called, should be called once per test.
1071- // callCount = callCount + 1;
1072- // traceLog(`unittest execution adapter seg fault error handling \n ${JSON.stringify(data)}`);
1073- // try {
1074- // if (data.status === 'error') {
1075- // if (data.error === undefined) {
1076- // // Dereference a NULL pointer
1077- // const indexOfTest = JSON.stringify(data).search('Dereference a NULL pointer');
1078- // if (indexOfTest === -1) {
1079- // failureOccurred = true;
1080- // failureMsg = 'Expected test to have a null pointer';
1081- // }
1082- // } else if (data.error.length === 0) {
1083- // failureOccurred = true;
1084- // failureMsg = "Expected errors in 'error' field";
1085- // }
1086- // } else {
1087- // const indexOfTest = JSON.stringify(data.result).search('error');
1088- // if (indexOfTest === -1) {
1089- // failureOccurred = true;
1090- // failureMsg =
1091- // 'If payload status is not error then the individual tests should be marked as errors. This should occur on windows machines.';
1092- // }
1093- // }
1094- // if (data.result === undefined) {
1095- // failureOccurred = true;
1096- // failureMsg = 'Expected results to be present';
1097- // }
1098- // // make sure the testID is found in the results
1099- // const indexOfTest = JSON.stringify(data).search('test_seg_fault.TestSegmentationFault.test_segfault');
1100- // if (indexOfTest === -1) {
1101- // failureOccurred = true;
1102- // failureMsg = 'Expected testId to be present';
1103- // }
1104- // } catch (err) {
1105- // failureMsg = err ? (err as Error).toString() : '';
1106- // failureOccurred = true;
1107- // }
1108- // return Promise.resolve();
1109- // };
1110-
1111- // const testId = `test_seg_fault.TestSegmentationFault.test_segfault`;
1112- // const testIds: string[] = [testId];
1113-
1114- // // set workspace to test workspace folder
1115- // workspaceUri = Uri.parse(rootPathErrorWorkspace);
1116- // configService.getSettings(workspaceUri).testing.unittestArgs = ['-s', '.', '-p', '*test*.py'];
1117-
1118- // // run pytest execution
1119- // const executionAdapter = new UnittestTestExecutionAdapter(
1120- // configService,
1121- // testOutputChannel.object,
1122- // resultResolver,
1123- // envVarsService,
1124- // );
1125- // const testRun = typeMoq.Mock.ofType<TestRun>();
1126- // testRun
1127- // .setup((t) => t.token)
1128- // .returns(
1129- // () =>
1130- // ({
1131- // onCancellationRequested: () => undefined,
1132- // } as any),
1133- // );
1134- // await executionAdapter
1135- // .runTests(workspaceUri, testIds, TestRunProfileKind.Run, testRun.object, pythonExecFactory)
1136- // .finally(() => {
1137- // assert.strictEqual(callCount, 1, 'Expected _resolveExecution to be called once');
1138- // assert.strictEqual(failureOccurred, false, failureMsg);
1139- // });
1140- // });
11411064 test ( 'pytest execution adapter seg fault error handling' , async ( ) => {
11421065 resultResolver = new PythonResultResolver ( testController , pytestProvider , workspaceUri ) ;
11431066 let callCount = 0 ;
0 commit comments