You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
execute: $ pytest PATH/TO/TEST.py --allure-severities critical --alluredir=./allure-result -n 2
The tests do not run and it outputs the error I pasted above.
What is the expected behavior?
Select the critical cases and run them in parallel with xdist.
What is the motivation / use case for changing the behavior?
The current workaround is to use both @allure.severity() and @pytest.mark.critical, with pytest -m critical so that allure generates critical test results and critical tests can be run in parallel. It would be more convenient to just use Allure's severity marking to handle both.
Starting from 5.1.0 pytest provides config.invocation_params property containing unchanged arguments passed to pytest.main() which xdist prefers to use instead of full-blown config.options (where the troublesome severity value is sitting). See pytest-dev/pytest#5564.
Hence, this issue is not relevant anymore. Just update to pytest 5.1.0+ and you`re good.
I'm submitting a ...
What is the current behavior?
Output
============================= test session starts ==============================
platform darwin -- Python 2.7.10, pytest-4.6.9, py-1.8.0, pluggy-0.13.0
rootdir: /Users/JacobMedina/Documents/selenium, inifile: pytest.ini
plugins: xdist-1.31.0, forked-1.1.3, allure-pytest-2.8.11
gw0 I / gw1 I
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/Users/JacobMedina/Library/Python/2.7/lib/python/site-packages/_pytest/main.py", line 204, in wrap_session
INTERNALERROR> config.hook.pytest_sessionstart(session=session)
INTERNALERROR> File "/Library/Python/2.7/site-packages/pluggy/hooks.py", line 286, in call
INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "/Library/Python/2.7/site-packages/pluggy/manager.py", line 92, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/Library/Python/2.7/site-packages/pluggy/manager.py", line 86, in
INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> File "/Library/Python/2.7/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "/Library/Python/2.7/site-packages/pluggy/callers.py", line 81, in get_result
INTERNALERROR> _reraise(*ex) # noqa
INTERNALERROR> File "/Library/Python/2.7/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/Users/JacobMedina/Library/Python/2.7/lib/python/site-packages/xdist/dsession.py", line 78, in pytest_sessionstart
INTERNALERROR> nodes = self.nodemanager.setup_nodes(putevent=self.queue.put)
INTERNALERROR> File "/Users/JacobMedina/Library/Python/2.7/lib/python/site-packages/xdist/workermanage.py", line 64, in setup_nodes
INTERNALERROR> nodes.append(self.setup_node(spec, putevent))
INTERNALERROR> File "/Users/JacobMedina/Library/Python/2.7/lib/python/site-packages/xdist/workermanage.py", line 73, in setup_node
INTERNALERROR> node.setup()
INTERNALERROR> File "/Users/JacobMedina/Library/Python/2.7/lib/python/site-packages/xdist/workermanage.py", line 264, in setup
INTERNALERROR> self.channel.send((self.workerinput, args, option_dict, change_sys_path))
INTERNALERROR> File "/Users/JacobMedina/Library/Python/2.7/lib/python/site-packages/execnet/gateway_base.py", line 729, in send
INTERNALERROR> self.gateway._send(Message.CHANNEL_DATA, self.id, dumps_internal(item))
INTERNALERROR> File "/Users/JacobMedina/Library/Python/2.7/lib/python/site-packages/execnet/gateway_base.py", line 1371, in dumps_internal
INTERNALERROR> return _Serializer().save(obj)
INTERNALERROR> File "/Users/JacobMedina/Library/Python/2.7/lib/python/site-packages/execnet/gateway_base.py", line 1389, in save
INTERNALERROR> self._save(obj)
INTERNALERROR> File "/Users/JacobMedina/Library/Python/2.7/lib/python/site-packages/execnet/gateway_base.py", line 1407, in _save
INTERNALERROR> dispatch(self, obj)
INTERNALERROR> File "/Users/JacobMedina/Library/Python/2.7/lib/python/site-packages/execnet/gateway_base.py", line 1494, in save_tuple
INTERNALERROR> self._save(item)
INTERNALERROR> File "/Users/JacobMedina/Library/Python/2.7/lib/python/site-packages/execnet/gateway_base.py", line 1407, in _save
INTERNALERROR> dispatch(self, obj)
INTERNALERROR> File "/Users/JacobMedina/Library/Python/2.7/lib/python/site-packages/execnet/gateway_base.py", line 1490, in save_dict
INTERNALERROR> self._write_setitem(key, value)
INTERNALERROR> File "/Users/JacobMedina/Library/Python/2.7/lib/python/site-packages/execnet/gateway_base.py", line 1484, in _write_setitem
INTERNALERROR> self._save(value)
INTERNALERROR> File "/Users/JacobMedina/Library/Python/2.7/lib/python/site-packages/execnet/gateway_base.py", line 1407, in _save
INTERNALERROR> dispatch(self, obj)
INTERNALERROR> File "/Users/JacobMedina/Library/Python/2.7/lib/python/site-packages/execnet/gateway_base.py", line 1505, in save_set
INTERNALERROR> self._write_set(s, opcode.SET)
INTERNALERROR> File "/Users/JacobMedina/Library/Python/2.7/lib/python/site-packages/execnet/gateway_base.py", line 1500, in _write_set
INTERNALERROR> self._save(item)
INTERNALERROR> File "/Users/JacobMedina/Library/Python/2.7/lib/python/site-packages/execnet/gateway_base.py", line 1407, in _save
INTERNALERROR> dispatch(self, obj)
INTERNALERROR> File "/Users/JacobMedina/Library/Python/2.7/lib/python/site-packages/execnet/gateway_base.py", line 1494, in save_tuple
INTERNALERROR> self._save(item)
INTERNALERROR> File "/Users/JacobMedina/Library/Python/2.7/lib/python/site-packages/execnet/gateway_base.py", line 1405, in _save
INTERNALERROR> raise DumpError("can't serialize {}".format(tp))
INTERNALERROR> DumpError: can't serialize <enum 'Severity'>
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
@allure.severity(allure.severity_level.CRITICAL)
def critical_test_1():
print('Hi')
@allure.severity(allure.severity_level.CRITICAL)
def critical_test_2():
print('Hi')
execute:
$ pytest PATH/TO/TEST.py --allure-severities critical --alluredir=./allure-result -n 2
The tests do not run and it outputs the error I pasted above.
What is the expected behavior?
Select the critical cases and run them in parallel with xdist.
What is the motivation / use case for changing the behavior?
The current workaround is to use both
@allure.severity()
and@pytest.mark.critical
, withpytest -m critical
so that allure generates critical test results and critical tests can be run in parallel. It would be more convenient to just use Allure's severity marking to handle both.Please tell us about your environment:
Other information
The text was updated successfully, but these errors were encountered: