Details
-
Sub-task
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Impala 4.5.0
-
None
-
None
-
ghx-label-12
Description
Some tests use the 'unittest' package to be the base class of their tests. These can be run by pytest, but when running the tests with python 3, they fail with this message:
../infra/python/env-gcc10.4.0-py3/lib/python3.7/site-packages/_pytest/runner.py:150: in __init__ self.result = func() ../infra/python/env-gcc10.4.0-py3/lib/python3.7/site-packages/_pytest/main.py:435: in _memocollect return self._memoizedcall('_collected', lambda: list(self.collect())) ../infra/python/env-gcc10.4.0-py3/lib/python3.7/site-packages/_pytest/main.py:315: in _memoizedcall res = function() ../infra/python/env-gcc10.4.0-py3/lib/python3.7/site-packages/_pytest/main.py:435: in <lambda> return self._memoizedcall('_collected', lambda: list(self.collect())) ../infra/python/env-gcc10.4.0-py3/lib/python3.7/site-packages/_pytest/python.py:605: in collect return super(Module, self).collect() ../infra/python/env-gcc10.4.0-py3/lib/python3.7/site-packages/_pytest/python.py:459: in collect res = self.makeitem(name, obj) ../infra/python/env-gcc10.4.0-py3/lib/python3.7/site-packages/_pytest/python.py:471: in makeitem collector=self, name=name, obj=obj) ../infra/python/env-gcc10.4.0-py3/lib/python3.7/site-packages/_pytest/vendored_packages/pluggy.py:724: in __call__ return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../infra/python/env-gcc10.4.0-py3/lib/python3.7/site-packages/_pytest/vendored_packages/pluggy.py:338: in _hookexec return self._inner_hookexec(hook, methods, kwargs) ../infra/python/env-gcc10.4.0-py3/lib/python3.7/site-packages/_pytest/vendored_packages/pluggy.py:333: in <lambda> _MultiCall(methods, kwargs, hook.spec_opts).execute() ../infra/python/env-gcc10.4.0-py3/lib/python3.7/site-packages/_pytest/vendored_packages/pluggy.py:595: in execute return _wrapped_call(hook_impl.function(*args), self.execute) ../infra/python/env-gcc10.4.0-py3/lib/python3.7/site-packages/_pytest/vendored_packages/pluggy.py:249: in _wrapped_call wrap_controller.send(call_outcome) E RuntimeError: generator raised StopIteration
Converting them to use the regular pytest base classes works fine with python 3 (and also python 2).