Mercurial > kallithea
changeset 7373:d63018164a30
tests: workaround for pytest 3.7.1 breaking autouse of classmethods
See https://github.com/pytest-dev/pytest/issues/3778 .
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sat, 01 Sep 2018 16:14:30 +0200 |
parents | 55fc0bcce916 |
children | d8b23000aad6 |
files | kallithea/tests/vcs/base.py |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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):