smarie / python-pytest-harvest

Store data created during your `pytest` tests execution, and retrieve it at the end of the session, e.g. for applicative benchmarking purposes.
https://smarie.github.io/python-pytest-harvest/
BSD 3-Clause "New" or "Revised" License
61 stars 8 forks source link

Error with pytest-xdist on python 3.5 #59

Closed fati1998 closed 2 years ago

fati1998 commented 2 years ago

When I run on python 3.5, I get the following error:

INTERNALERROR>   File "C:\Users\...\Documents\bem\bem_demo\.nox\run-bemenv24x\lib\site-packages\pytest_harvest\plugin.py", line 404, in pytest_harvest_xdist_init
INTERNALERROR>     rmtree(self.results_path)
INTERNALERROR>   File "C:\Users\...\Documents\bem\bem_demo\.nox\run-bemenv24x\lib\shutil.py", line 488, in rmtree
INTERNALERROR>     return _rmtree_unsafe(path, onerror)
INTERNALERROR>   File "C:\Users\...\Documents\bem\bem_demo\.nox\run-bemenv24x\lib\shutil.py", line 359, in _rmtree_unsafe
INTERNALERROR>     if os.path.islink(path):
INTERNALERROR>   File "C:\Users\...\Documents\bem\bem_demo\.nox\run-bemenv24x\lib\ntpath.py", line 249, in islink
INTERNALERROR>     st = os.lstat(path)
INTERNALERROR> TypeError: lstat: illegal type for path parameter
smarie commented 2 years ago

Indeed, pathlib objects were not properly handled by other stdlib modules in this python 3.5 version