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
pytest-xdist currently doesn't handle a StrEnum obj as strwhen it is serialized, which causes a "execnet.gateway_base.DumpError" error. The issue is seen when a StrEnum obj is passed as pytest-subtests subtest message.
Here is the minimum code to reproduce the issue:
from enum import StrEnum, auto
import pytest
from pytest_subtests import SubTests
class MyEnum(StrEnum):
FOO = auto()
@pytest.mark.parametrize("p", range(2))
def test_something(subtests: SubTests, p):
with subtests.test(MyEnum.FOO):
pass
Running the above test with pytest-xdist (with -n 2, for example) results in the following error:
pytest-xdist
currently doesn't handle aStrEnum
obj asstr
when it is serialized, which causes a "execnet.gateway_base.DumpError" error. The issue is seen when aStrEnum
obj is passed aspytest-subtests
subtest message.Here is the minimum code to reproduce the issue:
Running the above test with
pytest-xdist
(with-n 2
, for example) results in the following error:Environment
NOTE: I originally opened this issue in pytest-subtests but I was advised that it's actually a pytest-xdist issue.
The text was updated successfully, but these errors were encountered: