Path: blob/main/extensions/copilot/test/e2e/pythonFix.stest.ts
13388 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import * as path from 'path';6import { ssuite, stest } from '../base/stest';7import { pythonFixEvaluators } from './evaluators/pythonFix';8import { Scenario, fetchConversationScenarios } from './scenarioLoader';9import { generateScenarioTestRunner } from './scenarioTest';1011(function () {12ssuite({ title: 'fix', subtitle: 'python', location: 'panel' }, (inputPath) => {1314const scenarioFolder = inputPath ?? path.join(__dirname, '..', 'test/scenarios/test-scenario-fix-python');15const scenarios: Scenario[] = fetchConversationScenarios(scenarioFolder);1617// Dynamically create a test case per each entry in the scenarios array18for (let i = 0; i < scenarios.length; i++) {19const name = scenarios[i][0].name;20const label = name.replace('case', 'Case #').replace('.conversation.json', '');2122stest({ description: label, language: 'python' },23generateScenarioTestRunner(24scenarios[i],25pythonFixEvaluators[scenarios[i][0].name]26));27}28});29})();303132