-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: 'bool' object is not iterable
when running hypothesis test suite
#454
Comments
It also looks like py310-pyjion run-test: commands[0] | python -m pytest tests/cover tests/pytest tests/nocover -n auto
Traceback (most recent call last):
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/_pytest/main.py", line 269, in wrap_session
session.exitstatus = doit(config, session) or 0
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/_pytest/main.py", line 323, in _main
config.hook.pytest_runtestloop(session=session)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in __call__
return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_callers.py", line 60, in _multicall
return outcome.get_result()
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_result.py", line 60, in get_result
raise ex[1].with_traceback(ex[2])
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall
res = hook_impl.function(*args)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/xdist/dsession.py", line 112, in pytest_runtestloop
self.loop_once()
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/xdist/dsession.py", line 124, in loop_once
raise RuntimeError("Unexpectedly no active workers available")
RuntimeError: Unexpectedly no active workers available
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/runner/.cache/hypothesis-build-runtimes/python-versions/3.10.0/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/runner/.cache/hypothesis-build-runtimes/python-versions/3.10.0/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pytest/__main__.py", line 5, in <module>
raise SystemExit(pytest.console_main())
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/_pytest/config/__init__.py", line 185, in console_main
code = main()
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/_pytest/config/__init__.py", line 162, in main
ret: Union[ExitCode, int] = config.hook.pytest_cmdline_main(
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in __call__
return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_callers.py", line 60, in _multicall
return outcome.get_result()
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_result.py", line 60, in get_result
raise ex[1].with_traceback(ex[2])
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall
res = hook_impl.function(*args)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/_pytest/main.py", line 316, in pytest_cmdline_main
return wrap_session(config, _main)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/_pytest/main.py", line 289, in wrap_session
config.notify_exception(excinfo, config.option)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1038, in notify_exception
if not any(res):
TypeError: 'bool' object is not iterable |
(oops, misclick) |
And then in singleprocess mode I get another error: py310-pyjion run-test: commands[0] | python -m pytest tests/cover tests/pytest tests/nocover
Traceback (most recent call last):
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/_pytest/main.py", line 269, in wrap_session
session.exitstatus = doit(config, session) or 0
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/_pytest/main.py", line 322, in _main
config.hook.pytest_collection(session=session)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in __call__
return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_callers.py", line 60, in _multicall
return outcome.get_result()
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_result.py", line 60, in get_result
raise ex[1].with_traceback(ex[2])
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall
res = hook_impl.function(*args)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/_pytest/main.py", line 333, in pytest_collection
session.perform_collect()
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/_pytest/main.py", line 641, in perform_collect
hook.pytest_collection_finish(session=self)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in __call__
return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_callers.py", line 60, in _multicall
return outcome.get_result()
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_result.py", line 60, in get_result
raise ex[1].with_traceback(ex[2])
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall
res = hook_impl.function(*args)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/_pytest/terminal.py", line 750, in pytest_collection_finish
self._write_report_lines_from_hooks(lines)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/_pytest/terminal.py", line 720, in _write_report_lines_from_hooks
for line_or_lines in reversed(lines):
TypeError: 'NoneType' object is not reversible
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/runner/.cache/hypothesis-build-runtimes/python-versions/3.10.0/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/runner/.cache/hypothesis-build-runtimes/python-versions/3.10.0/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pytest/__main__.py", line 5, in <module>
raise SystemExit(pytest.console_main())
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/_pytest/config/__init__.py", line 185, in console_main
code = main()
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/_pytest/config/__init__.py", line 162, in main
ret: Union[ExitCode, int] = config.hook.pytest_cmdline_main(
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in __call__
return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_callers.py", line 60, in _multicall
return outcome.get_result()
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_result.py", line 60, in get_result
raise ex[1].with_traceback(ex[2])
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall
res = hook_impl.function(*args)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/_pytest/main.py", line 316, in pytest_cmdline_main
return wrap_session(config, _main)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/_pytest/main.py", line 289, in wrap_session
config.notify_exception(excinfo, config.option)
File "/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py310-pyjion/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1038, in notify_exception
if not any(res):
TypeError: 'bool' object is not iterable |
thanks for the detailed report. Looks like there are 2 or 3 separate issues here. Which version of pyjion did this run on? The command-line was changed in #440 |
Happy to help! This was v1.1.1, with those changes - the linked PR against Hypothesis has the build steps if that helps. |
Ok, I can easily repro the xdist bug. I'll add an xdist test run in future for regression and get to the bottom of this.
|
pyjion -m pytest
should permit additional arguments to the moduleTypeError: 'bool' object is not iterable
when running hypothesis test suite
Related: #458 |
Just to confirm. I ran the test suite from the latest commit and got
So the bug was when running with |
Yep! There was also the mysterious If you want another confirmation before releasing I can set that tox env to install from a github commit and enable Hypothesis' Pyjion CI job; otherwise I'll do that after release and let you know if we see any regressions. |
Just shipped 1.2.0, that should have a number of changes that'll help in those test cases |
In HypothesisWorks/hypothesis#3181, I eventually got
Not entirely clear what causes |
I'm trying to add Pyjion to our CI over in HypothesisWorks/hypothesis#3165, but I get the following error:
I've poked at
__main__.py
, butArgumentParser.parse_known_args()
doesn't seem to play nicely withrunpy
and you still have the problem of any positional arguments to the module being misinterpreted as pyjion'sscript
argument, as in the error above.The text was updated successfully, but these errors were encountered: