Skip to content

Commit e77c1eb

Browse files
c0llab0rat0rntninja
authored andcommitted
Remove dependency on mock (not needed after requiring Python 3.6); upgrade mypy and pytest
1 parent 3d399d3 commit e77c1eb

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

test/unit/test_filescanner.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@
88
from ipfshttpclient import filescanner
99

1010

11-
TEST_FILE_DIR = os.path.join(os.path.dirname(__file__), "..", "functional") # type: str
11+
TEST_FILE_DIR: str = os.path.join(os.path.dirname(__file__), "..", "functional")
1212

1313

14-
@pytest.mark.skipif(sys.version_info < (3, 6), reason="fnmatch.translate output changed in Python 3.6+")
1514
@pytest.mark.parametrize("pattern,expected,kwargs", [
1615
("literal", [r"(?![.])(?s:literal)\Z"], {}),
1716
(b"literal", [br"(?![.])(?s:literal)\Z"], {}),

tox.ini

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,22 @@ envlist =
77
styleck,
88
typeck
99

10-
# Enable slower `isolated_build` for PEP-518 compatiblity
10+
# Enable slower `isolated_build` for PEP-518 compatibility
1111
isolated_build = true
1212

1313

1414
[testenv]
1515
deps =
16-
pytest ~= 5.0
17-
pytest-cov ~= 2.6
18-
pytest-dependency ~= 0.4
16+
pytest ~= 6.2
17+
pytest-cov ~= 2.11
18+
pytest-dependency ~= 0.5
1919
pytest-localserver ~= 0.5
20-
pytest-mock ~= 1.10
20+
pytest-mock ~= 3.5
2121
pytest-ordering ~= 0.6
2222

2323
pytest-cid ~= 1.1
2424
py-cid
2525

26-
mock
2726
whitelist_externals = ipfs
2827
passenv = IPFS_* PY_IPFS_HTTP_CLIENT_*
2928
commands =
@@ -62,8 +61,8 @@ commands =
6261
[testenv:typeck]
6362
skip_install = true
6463
deps =
65-
mypy ~= 0.790
66-
pytest ~= 5.0
64+
mypy ~= 0.812
65+
pytest ~= 6.2
6766
{[testenv:py3-httpx]deps-exclusive}
6867
commands =
6968
mypy --config-file=tox.ini {posargs} -p ipfshttpclient
@@ -156,6 +155,3 @@ testpaths =
156155
ipfshttpclient
157156
test/unit
158157
test/functional
159-
160-
#XXX: Drop standalone mock once we're 3.6+-only
161-
mock_use_standalone_module = true

0 commit comments

Comments
 (0)