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
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:
I expected this to work as the value I passed is technically a string (MyEnum.FOO is of type str).
NOTE: I'm actually not sure if this should be handled by pytest-xdist (execnet) or pytest-subtests. I decided to open it as a pytest-subtests issue after seeing this comment.
Environment
Python 3.12
pytest==8.3.4
pytest-subtests==0.13.1
pytest-xdist==3.6.1
The text was updated successfully, but these errors were encountered:
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:I expected this to work as the value I passed is technically a string (
MyEnum.FOO
is of typestr
).NOTE: I'm actually not sure if this should be handled by pytest-xdist (execnet) or pytest-subtests. I decided to open it as a pytest-subtests issue after seeing this comment.
Environment
The text was updated successfully, but these errors were encountered: