|
11 | 11 | import xml.etree.ElementTree as ET
|
12 | 12 | from datetime import datetime
|
13 | 13 | from enum import Enum
|
14 |
| -from pathlib import PosixPath |
| 14 | +from pathlib import Path, PosixPath |
15 | 15 |
|
16 | 16 | from colorama import Fore
|
17 | 17 | from twisterlib.statuses import TwisterStatus
|
@@ -171,7 +171,7 @@ def xunit_report_suites(self, json_file, filename):
|
171 | 171 | runnable = suite.get('runnable', 0)
|
172 | 172 | duration += float(handler_time)
|
173 | 173 | ts_status = TwisterStatus(suite.get('status'))
|
174 |
| - classname = PosixPath(suite.get("name","")).name |
| 174 | + classname = Path(suite.get("name","")).name |
175 | 175 | for tc in suite.get("testcases", []):
|
176 | 176 | status = TwisterStatus(tc.get('status'))
|
177 | 177 | reason = tc.get('reason', suite.get('reason', 'Unknown'))
|
@@ -253,7 +253,7 @@ def xunit_report(self, json_file, filename, selected_platform=None, full_report=
|
253 | 253 | ):
|
254 | 254 | continue
|
255 | 255 | if full_report:
|
256 |
| - classname = PosixPath(ts.get("name","")).name |
| 256 | + classname = Path(ts.get("name","")).name |
257 | 257 | for tc in ts.get("testcases", []):
|
258 | 258 | status = TwisterStatus(tc.get('status'))
|
259 | 259 | reason = tc.get('reason', ts.get('reason', 'Unknown'))
|
|
0 commit comments