Windows 10 - I can't run the tests with 'poetry run pytest tests/'
- Dominant language
- Python
- Stars
- 28.4k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Description
Hello all,
I've tried everything I can - different python versions, fresh environments, etc. but I can't get the tests to run from the command line. Can anyone give me some suggestions, based upon this output? I would super appreciate it.
(py3812) C:\Python\spleeter>poetry run pytest tests/
===================================================================== test session starts =====================================================================
platform win32 -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 -- C:\Anaconda\envs\py3812\python.exe
cachedir: .pytest_cache
rootdir: C:\Python\spleeter, configfile: pyproject.toml
plugins: anyio-3.5.0, forked-1.4.0
collected 53 items
tests/test_command.py::test_version
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "C:\Anaconda\envs\py3812\lib\site-packages\_pytest\main.py", line 269, in wrap_session
INTERNALERROR> session.exitstatus = doit(config, session) or 0
INTERNALERROR> File "C:\Anaconda\envs\py3812\lib\site-packages\_pytest\main.py", line 323, in _main
INTERNALERROR> config.hook.pytest_runtestloop(session=session)
INTERNALERROR> File "C:\Anaconda\envs\py3812\lib\site-packages\pluggy\_hooks.py", line 265, in __call__
INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR> File "C:\Anaconda\envs\py3812\lib\site-packages\pluggy\_manager.py", line 80, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> File "C:\Anaconda\envs\py3812\lib\site-packages\pluggy\_callers.py", line 60, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "C:\Anaconda\envs\py3812\lib\site-packages\pluggy\_result.py", line 60, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "C:\Anaconda\envs\py3812\lib\site-packages\pluggy\_callers.py", line 39, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "C:\Anaconda\envs\py3812\lib\site-packages\_pytest\main.py", line 348, in pytest_runtestloop
INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
INTERNALERROR> File "C:\Anaconda\envs\py3812\lib\site-packages\pluggy\_hooks.py", line 265, in __call__
INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR> File "C:\Anaconda\envs\py3812\lib\site-packages\pluggy\_manager.py", line 80, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> File "C:\Anaconda\envs\py3812\lib\site-packages\pluggy\_callers.py", line 60, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "C:\Anaconda\envs\py3812\lib\site-packages\pluggy\_result.py", line 60, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "C:\Anaconda\envs\py3812\lib\site-packages\pluggy\_callers.py", line 39, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "C:\Anaconda\envs\py3812\lib\site-packages\pytest_forked\__init__.py", line 51, in pytest_runtest_protocol
INTERNALERROR> reports = forked_run_report(item)
INTERNALERROR> File "C:\Anaconda\envs\py3812\lib\site-packages\pytest_forked\__init__.py", line 73, in forked_run_report
INTERNALERROR> ff = py.process.ForkedFunc(runforked)
INTERNALERROR> File "C:\Anaconda\envs\py3812\lib\site-packages\py\_process\forkedfunc.py", line 45, in __init__
INTERNALERROR> pid = os.fork()
INTERNALERROR> AttributeError: module 'os' has no attribute 'fork'
=================================================================== no tests ran in 10.05s ====================================================================
Exception ignored in:
Traceback (most recent call last):
File "C:\Anaconda\envs\py3812\lib\site-packages\py\_process\forkedfunc.py", line 110, in __del__
if self.pid is not None: # only clean up in main process
AttributeError: 'ForkedFunc' object has no attribute 'pid'
(py3812) C:\Python\spleeter>
Any thoughts? Thanks!
Contributor guide
Research direction
Start by reproducing `poetry run pytest tests/` on Windows 10 with the versions shown in the report, then inspect the pytest and `pytest_forked` configuration in `pyproject.toml`. Done means the tests run successfully on Windows without the `os.fork` internal error, with any platform-specific limitation documented if it cannot be changed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100