Merge pull request #2355 from alex/pin-pytest

Pin pytest to <2.8, there's a bug with deprecation warnings