[PATCH 1 of 4] pytest: restrict to 3.7.0 to avoid regression in 3.7.1

Thomas De Schampheleire thomas.de_schampheleire at nokia.com
Thu Aug 30 20:42:05 UTC 2018


# HG changeset patch
# User Thomas De Schampheleire <thomas.de_schampheleire at nokia.com>
# Date 1535660955 -7200
#      Thu Aug 30 22:29:15 2018 +0200
# Node ID ad3cc6e18d57c36c56334476f2a92da19cdf4739
# Parent  61bd3efe4a6c2f68e88313d0aa237188145fa558
pytest: restrict to 3.7.0 to avoid regression in 3.7.1

With pytest 3.7.1, VCS tests fail as:

――――――――――――――――― ERROR at setup of TestGitBranches.test_new_branch ―――――――――――――――――
kallithea/tests/vcs/base.py:90: in _possibly_recreate_repo
    self.setup_repo(self.backend_class)
E   AttributeError: 'TestGitBranches' object has no attribute 'backend_class'


Either this is a regression in pytest itself, or we are using a funky
construct (yes, we are) that should be replaced with something else.
Until we sorted it out with the pytest developers, restrict the upper bound
of pytest version.

diff --git a/dev_requirements.txt b/dev_requirements.txt
--- a/dev_requirements.txt
+++ b/dev_requirements.txt
@@ -1,6 +1,8 @@
 Babel >= 0.9.6, < 2.4
 waitress >= 0.8.8, < 1.0
-pytest >= 3.3.0, < 4
+# pytest 3.7.1 causes test failures in the VCS tests
+# to be discussed with the pytest developers
+pytest >= 3.3.0, < 3.7.1
 pytest-runner
 pytest-sugar >= 0.7.0
 pytest-benchmark


More information about the kallithea-general mailing list