( pathWithoutFunction: string, maybeFunctionName: string | undefined, finalConfig: Record<string, any> | undefined, )
| 288 | } |
| 289 | |
| 290 | async function readPythonTestCases( |
| 291 | pathWithoutFunction: string, |
| 292 | maybeFunctionName: string | undefined, |
| 293 | finalConfig: Record<string, any> | undefined, |
| 294 | ): Promise<TestCase[]> { |
| 295 | const args = finalConfig === undefined ? [] : [finalConfig]; |
| 296 | const result = await runPython(pathWithoutFunction, maybeFunctionName ?? 'generate_tests', args); |
| 297 | if (!Array.isArray(result)) { |
| 298 | throw new Error(`Python test function must return a list of test cases, got ${typeof result}`); |
| 299 | } |
| 300 | return result; |
| 301 | } |
| 302 | |
| 303 | function parseLocalCsv(fileContent: string, delimiter: string, relaxQuotes: boolean): CsvRow[] { |
| 304 | return parseCsv(fileContent, { |
no test coverage detected
searching dependent graphs…