# HG changeset patch # User Mads Kiilerich # Date 1535811270 -7200 # Node ID d63018164a308f1005c250a284279fe6f15cf8a3 # Parent 55fc0bcce91603070720a5a06fe3d553e83bd936 tests: workaround for pytest 3.7.1 breaking autouse of classmethods See https://github.com/pytest-dev/pytest/issues/3778 . diff -r 55fc0bcce916 -r d63018164a30 kallithea/tests/vcs/base.py --- a/kallithea/tests/vcs/base.py Sat Sep 01 16:14:24 2018 +0200 +++ b/kallithea/tests/vcs/base.py Sat Sep 01 16:14:30 2018 +0200 @@ -52,13 +52,13 @@ ] return commits - @classmethod + # Note: cannot use classmethod fixtures with pytest 3.7.1+ @pytest.fixture(autouse=True, scope='class') - def _configure_backend(cls, request): - Backend = vcs.get_backend(cls.backend_alias) - cls.backend_class = Backend - cls.setup_repo(Backend) + def _configure_backend(self, request): + Backend = vcs.get_backend(self.backend_alias) + type(self).backend_class = Backend + type(self).setup_repo(Backend) @classmethod def setup_empty_repo(cls, backend):