Skip to content

Commit

Permalink
Fix obsolete version checker
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Nov 30, 2021
1 parent b1d4227 commit 5b70e53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ flake8==4.0.1
mypy==0.910
black==21.11b1
isort==5.10.1
packaging==2.4.7
-r ci.txt
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys
import traceback
import uuid
from distutils.version import StrictVersion
from packaging.version import parse as parse_version
from typing import Any, Dict

import pytest
Expand Down Expand Up @@ -137,7 +137,7 @@ async def requires_api_version(docker):
await docker.version()

def check(version, reason):
if StrictVersion(docker.api_version[1:]) < StrictVersion(version[1:]):
if parse_version(docker.api_version[1:]) < parse_version(version[1:]):
pytest.skip(reason)

yield check
Expand Down

0 comments on commit 5b70e53

Please sign in to comment.