File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -126,8 +126,13 @@ jobs:
126126 toolSection = pyProjectSettings["tool"]
127127 if "pytest" in toolSection:
128128 section = toolSection["pytest"]
129+ # TODO: will be dropped in @r8
129130 if "junit_xml" in section:
130131 unittestXMLFile = Path(section["junit_xml"])
132+ elif "addopts" in section:
133+ options = {k: v for k, v in (option.split("=") for option in section["addopts"] if "=" in option)}
134+ if "--junitxml" in options:
135+ unittestXMLFile = Path(options["--junitxml"])
131136
132137 if "pyedaa-reports" in toolSection:
133138 section = toolSection["pyedaa-reports"]
Original file line number Diff line number Diff line change @@ -38,7 +38,10 @@ cobertura_xml_report = "report/typing"
3838
3939[tool .pytest ]
4040addopts = [
41+ " -ra" ,
42+ " --show-capture=all" ,
4143 " --tb=native" ,
44+ " --color=yes" ,
4245 " --junitxml=report/unit/UnittestReportSummary.xml"
4346]
4447# Don't set 'python_classes = *' otherwise, pytest doesn't search for classes
@@ -49,7 +52,6 @@ filterwarnings = [
4952 " error::DeprecationWarning" ,
5053 " error::PendingDeprecationWarning"
5154]
52- junit_xml = " report/unit/UnittestReportSummary.xml"
5355junit_logging = " all"
5456
5557[tool .pyedaa-reports ]
Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ $runUnitFunc = {
155155
156156 $env: PYTHONPATH = " ."
157157 $env: ENVIRONMENT_NAME = " Windows (x86-64)"
158- pytest - raP -- color = yes - - template= html1/ index.html -- report= report/ unit/ html/ index.html - -split - report tests/ unit
158+ pytest -- template= html1/ index.html -- report= report/ unit/ html/ index.html - -split - report tests/ unit
159159
160160 if ($copy ) {
161161 & $runCopyFunc $live
@@ -177,7 +177,7 @@ $runCovFunc = {
177177
178178 $env: PYTHONPATH = " ."
179179 $env: ENVIRONMENT_NAME = " Windows (x86-64)"
180- coverage run -- data- file= .coverage -- rcfile= pyproject.toml - m pytest - ra -- color = yes tests/ unit
180+ coverage run -- data- file= .coverage -- rcfile= pyproject.toml - m pytest tests/ unit
181181
182182 if ($live ) {
183183 Write-Host - ForegroundColor DarkMagenta " [live][COV] Convert coverage report to HTML ..."
You can’t perform that action at this time.
0 commit comments