Skip to content

Commit

Permalink
Compatibility for IntEnum change in upcoming pytest 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoddemus committed Jun 14, 2019
1 parent 407d6e1 commit db1c3e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/xdist/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ def pytest_sessionstart(self, session):

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

Expand Down

0 comments on commit db1c3e7

Please sign in to comment.