Regression test for pytest-dev/pytest-xdist#1273.
(pytester: pytest.Pytester)
| 1049 | |
| 1050 | |
| 1051 | def test_serialization_xdist(pytester: pytest.Pytester) -> None: class="cm"># pragma: no cover |
| 1052 | class="st">""class="st">"Regression test for pytest-dev/pytest-xdistclass="cm">#1273."class="st">"" |
| 1053 | pytest.importorskip(class="st">"xdist") |
| 1054 | pytester.makepyfile( |
| 1055 | class="st">""" |
| 1056 | from enum import Enum |
| 1057 | import unittest |
| 1058 | |
| 1059 | class MyEnum(Enum): |
| 1060 | A = class="st">"A" |
| 1061 | |
| 1062 | def test(subtests): |
| 1063 | with subtests.test(a=MyEnum.A): |
| 1064 | pass |
| 1065 | |
| 1066 | class T(unittest.TestCase): |
| 1067 | |
| 1068 | def test(self): |
| 1069 | with self.subTest(a=MyEnum.A): |
| 1070 | pass |
| 1071 | class="st">""" |
| 1072 | ) |
| 1073 | pytester.syspathinsert() |
| 1074 | result = pytester.runpytest(class="st">"-n1", class="st">"-pxdist.plugin") |
| 1075 | result.assert_outcomes(passed=2) |
nothing calls this directly
no test coverage detected