Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions test/unit/test_client.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import pytest
import warnings

import ipfshttpclient


def test_assert_version():
with pytest.warns(None) as warnings:
with warnings.catch_warnings():
# Minimum required version
ipfshttpclient.assert_version("0.1.0", "0.1.0", "0.2.0", ["0.1.2"])

assert len(warnings) == 0
warnings.simplefilter("error")

# Too high version
with pytest.warns(ipfshttpclient.exceptions.VersionMismatch):
Expand Down Expand Up @@ -41,4 +42,4 @@ def test_client_session_context():
assert client._client._session is None
with client:
assert client._client._session is not None
assert client._client._session is None
assert client._client._session is None
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ isolated_build = true

[testenv]
deps =
pytest ~= 6.2
pytest >= 7.0.0
pytest-cov ~= 2.11
pytest-dependency ~= 0.5
pytest-localserver ~= 0.5
Expand Down