Skip to content

Commit

Permalink
Force pytest to use xunit1 report
Browse files Browse the repository at this point in the history
  • Loading branch information
kondratyev-nv committed Apr 25, 2020
1 parent 7322159 commit 7d90e8b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/pytest/pytestTestRunner.ts
Expand Up @@ -154,8 +154,11 @@ pytest.main(sys.argv[1:], plugins=[PythonTestExplorerDiscoveryOutputPlugin()])`;

const additionalEnvironment = await EnvironmentVariablesLoader.load(config.envFile(), process.env, this.logger);
const { file, cleanupCallback } = await this.createTemporaryFile();
const runArguments = [`--junitxml=${file}`].concat(
this.getRunArguments(test, config.getPytestConfiguration().pytestArguments));
const runArguments = [
`--junitxml=${file}`,
'--override-ini', 'junit_logging=all',
'--override-ini', 'junit_family=xunit1',
].concat(this.getRunArguments(test, config.getPytestConfiguration().pytestArguments));
this.logger.log('info', `Running pytest wrapper with arguments: ${runArguments}`);
const testExecution = runScript({
pythonPath: config.pythonPath(),
Expand Down
2 changes: 2 additions & 0 deletions test/test_samples/pytest/pytest.ini
@@ -0,0 +1,2 @@
[pytest]
junit_family=xunit2

0 comments on commit 7d90e8b

Please sign in to comment.