Skip to content

Commit db1c3e7

Browse files
committed
Compatibility for IntEnum change in upcoming pytest 5.0
Related to pytest-dev/pytest#5420
1 parent 407d6e1 commit db1c3e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/xdist/remote.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ def pytest_sessionstart(self, session):
4141

4242
@pytest.hookimpl(hookwrapper=True)
4343
def pytest_sessionfinish(self, exitstatus):
44-
self.config.workeroutput["exitstatus"] = exitstatus
44+
# in pytest 5.0+, exitstatus is an IntEnum object
45+
self.config.workeroutput["exitstatus"] = int(exitstatus)
4546
yield
4647
self.sendevent("workerfinished", workeroutput=self.config.workeroutput)
4748

0 commit comments

Comments
 (0)