Skip to content

Commit c03867a

Browse files
c0llab0rat0rntninja
authored andcommittedMay 30, 2021
Remove pytest skips related to old, unsupported versions of Python and IPFS
1 parent 8f628ce commit c03867a

File tree

3 files changed

+5
-18
lines changed

3 files changed

+5
-18
lines changed
 

‎test/functional/test_dag.py

-11
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
import io
22

3-
import pytest
4-
53
import conftest
64

75

86
def test_put_get_resolve(client):
9-
version = tuple(map(int, client.version()["Version"].split('-', 1)[0].split('.')))
10-
if version < (0, 5):
11-
pytest.skip("IPFS DAG APIs first appeared in go-IPFS 0.5")
12-
137
data = io.BytesIO(br'{"links": []}')
148
response = client.dag.put(data)
159

@@ -29,14 +23,9 @@ def test_put_get_resolve(client):
2923

3024

3125
def test_import_export(client):
32-
version = tuple(map(int, client.version()["Version"].split('-', 1)[0].split('.')))
33-
if version < (0, 5):
34-
pytest.skip("IPFS DAG APIs first appeared in go-IPFS 0.5")
35-
3626
# This file was created by inserting a simple JSON object into IPFS and
3727
# exporting it using `ipfs dag export <cid> > file.car`
3828
data_car = conftest.TEST_DIR / 'fake_json' / 'data.car'
39-
data_car = str(data_car) #PY35
4029

4130
with open(data_car, 'rb') as file:
4231
response = client.dag.imprt(file)

‎test/functional/test_miscellaneous.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ def test_daemon_stop(daemon, client):
2727
# with access to the created daemon subprocess object defined directly
2828
# in the `test/run-test.py` file
2929
if not daemon:
30-
pytest.skip("Not started using `test/run-test.py`")
31-
30+
return
31+
3232
def daemon_is_running():
3333
return daemon.poll() is None
3434

‎test/unit/test_http_httpx.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,15 @@
33
# `test_http.py` instead.
44
import http.cookiejar
55
import math
6-
import sys
7-
86
import pytest
97

10-
if sys.version_info <= (3, 6):
11-
pytest.skip("HTTPx requires Python 3.6+", allow_module_level=True)
128
pytest.importorskip("ipfshttpclient.http_httpx")
139
import ipfshttpclient.http_httpx
1410

1511

1612
cookiejar = http.cookiejar.CookieJar()
1713

14+
1815
@pytest.mark.parametrize("kwargs,expected", [
1916
({}, {}),
2017
@@ -47,6 +44,7 @@
4744
def test_map_args_to_httpx(kwargs, expected):
4845
assert ipfshttpclient.http_httpx.map_args_to_httpx(**kwargs) == expected
4946

47+
5048
@pytest.mark.parametrize("args,kwargs,expected_kwargs,expected_base,expected_laddr", [
5149
(("/dns/localhost/tcp/5001/http", "api/v0"), {}, {
5250
"params": [("stream-channels", "true")],
@@ -70,4 +68,4 @@ def test_client_args_to_session_kwargs(args, kwargs, expected_kwargs, expected_b
7068
client = ipfshttpclient.http_httpx.ClientSync(*args, **kwargs)
7169
assert client._session_kwargs == expected_kwargs
7270
assert client._session_base == expected_base
73-
assert client._session_laddr == expected_laddr
71+
assert client._session_laddr == expected_laddr

0 commit comments

Comments
 (0)
Please sign in to comment.