Compatibility for IntEnum change in upcoming pytest 5.0 (#442)
Compatibility for IntEnum change in upcoming pytest 5.0
This commit is contained in:
1
changelog/442.feature.rst
Normal file
1
changelog/442.feature.rst
Normal file
@@ -0,0 +1 @@
|
||||
Compatibility fix for upcoming pytest 5.0: ``session.exitstatus`` is now an ``IntEnum`` object.
|
||||
@@ -41,7 +41,8 @@ class WorkerInteractor(object):
|
||||
|
||||
@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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user