Skip to content

Commit 4f33203

Browse files
committed
Fix agent
1 parent 3500c39 commit 4f33203

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pytest_reportportal/service.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
from _pytest.doctest import DoctestItem
2626
from aenum import auto, Enum, unique
27+
from py.path import local
2728
from pytest import Class, Function, Module, Package, Item, Session, PytestWarning
2829
from reportportal_client.aio import Task
2930
from reportportal_client.core.rp_issues import Issue, ExternalIssue
@@ -209,7 +210,7 @@ def start_launch(self) -> Optional[str]:
209210
LOGGER.debug('ReportPortal - Launch started: id=%s', self._launch_id)
210211
return self._launch_id
211212

212-
def _get_item_dirs(self, item: Item) -> List[str]:
213+
def _get_item_dirs(self, item: Item) -> List[local]:
213214
"""
214215
Get directory of item.
215216
@@ -219,7 +220,7 @@ def _get_item_dirs(self, item: Item) -> List[str]:
219220
root_path = item.session.config.rootdir.strpath
220221
dir_path = item.fspath.new(basename="")
221222
rel_dir = dir_path.new(dirname=dir_path.relto(root_path), basename="", drive="")
222-
return [str(d) for d in rel_dir.parts(reverse=False) if d.basename]
223+
return [d for d in rel_dir.parts(reverse=False) if d.basename]
223224

224225
def _get_tree_path(self, item: Item) -> List[Item]:
225226
"""Get item of parents.

0 commit comments

Comments
 (0)