-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote branch 'origin/master' into edge
- Loading branch information
Showing
5 changed files
with
54 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ tsconfig.json | |
**/*.ts.map | ||
xfail.yaml | ||
vscode-test-win-workaround.py | ||
convert-mocha-junit-report.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#! env python | ||
"""This tool wraps around the e3.testsuite XUnit report import feature to customize test | ||
naming based on the reports obtained in VS Code testing from the mocha-junit-reporter | ||
module.""" | ||
|
||
from e3.testsuite.report.xunit import XUnitImporter, XUnitImporterApp | ||
|
||
|
||
class XUnitImporterCustomTestNaming(XUnitImporter): | ||
def get_test_name( | ||
self, | ||
testsuite_name: str, | ||
testcase_name: str, | ||
classname: str | None = None, | ||
) -> str: | ||
"""Override naming scheme to ignore the testcase name because it | ||
duplicates the information from the testsuite name and the classname | ||
attribute.""" | ||
return super().get_test_name(testsuite_name, "", classname) | ||
|
||
|
||
class MochaJUnitImporterApp(XUnitImporterApp): | ||
|
||
def create_importer(self) -> XUnitImporter: | ||
return XUnitImporterCustomTestNaming(self.index, self.xfails) | ||
|
||
|
||
if __name__ == "__main__": | ||
MochaJUnitImporterApp().run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters