[ 
https://issues.apache.org/jira/browse/IMPALA-13124?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joe McDonnell resolved IMPALA-13124.
------------------------------------
    Fix Version/s: Impala 4.5.0
       Resolution: Fixed

> Migrate tests that use the 'unittest' package to use normal pytest base class
> -----------------------------------------------------------------------------
>
>                 Key: IMPALA-13124
>                 URL: https://issues.apache.org/jira/browse/IMPALA-13124
>             Project: IMPALA
>          Issue Type: Sub-task
>          Components: Infrastructure
>    Affects Versions: Impala 4.5.0
>            Reporter: Joe McDonnell
>            Assignee: Joe McDonnell
>            Priority: Major
>             Fix For: Impala 4.5.0
>
>
> 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:
> {noformat}
> ../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{noformat}
> Converting them to use the regular pytest base classes works fine with python 
> 3 (and also python 2).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to