kevlened / pytest-parallel

A pytest plugin for parallel and concurrent testing
https://github.com/browsertron/pytest-parallel/issues/104#issuecomment-1293941066
MIT License
314 stars 61 forks source link

AttributeError: Can't pickle local object 'ArgumentParser.__init__.<locals>.identity' on Windows #128

Open SofianeHamlaoui opened 9 months ago

SofianeHamlaoui commented 9 months ago

OS : Windows 11 Pytest : 8.0.0 Pytest-parallel : 0.1.1 Command executed : pytest --workers 2 tests/endpoint_test.py

The error :

Exception in thread Thread-1 (process_responses):
Traceback (most recent call last):
  File "C:\Users\$USER\AppData\Local\Programs\Python\Python310\lib\multiprocessing\connection.py", line 312, in _recv_bytes
    nread, err = ov.GetOverlappedResult(True)
BrokenPipeError: [WinError 109] The pipe has been ended

During handling of the above exception, another exception occurred:
.
.
.
.
.
INTERNALERROR>   File "C:\Users\$USER\AppData\Local\Programs\Python\Python310\lib\multiprocessing\reduction.py", line 60, in dump
INTERNALERROR>     ForkingPickler(file, protocol).dump(obj)
INTERNALERROR> AttributeError: Can't pickle local object 'ArgumentParser.__init__.<locals>.identity'