We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 832b59b + 85a3333 commit 176d274Copy full SHA for 176d274
changelog/4306.bugfix.rst
@@ -0,0 +1 @@
1
+Parse ``minversion`` as an actual version and not as dot-separated strings.
src/_pytest/config/__init__.py
@@ -11,6 +11,7 @@
11
import sys
12
import types
13
import warnings
14
+from distutils.version import LooseVersion
15
16
import py
17
import six
@@ -816,9 +817,7 @@ def _checkversion(self):
816
817
818
minver = self.inicfg.get("minversion", None)
819
if minver:
- ver = minver.split(".")
820
- myver = pytest.__version__.split(".")
821
- if myver < ver:
+ if LooseVersion(minver) > LooseVersion(pytest.__version__):
822
raise pytest.UsageError(
823
"%s:%d: requires pytest-%s, actual pytest-%s'"
824
% (
0 commit comments