Use new pytest api to keep building with pytest 5 (#353)

2 files changed