Skip to content

Commit f589961

Browse files
committed
update test dependencies
- add pytest-asyncio - remove mock (only needed for py2)
1 parent 10d0b65 commit f589961

File tree

6 files changed

+23
-26
lines changed

6 files changed

+23
-26
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ __pycache__
2222
*coverage.xml
2323
.coverage.*
2424
.idea
25+
htmlcov

ipyparallel/tests/test_apps.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
import sys
33
import types
44
from subprocess import check_output
5+
from unittest.mock import create_autospec
6+
from unittest.mock import MagicMock
7+
from unittest.mock import patch
58

69
import zmq
710
from ipykernel import iostream
@@ -13,11 +16,6 @@
1316
from ipyparallel.apps import ipengineapp
1417
from ipyparallel.util import ioloop
1518

16-
try:
17-
from unittest.mock import patch, MagicMock, create_autospec
18-
except ImportError: # py2
19-
from mock import patch, MagicMock, create_autospec
20-
2119

2220
def _get_output(cmd):
2321
out = check_output([sys.executable, '-m', 'ipyparallel.cluster', '--version'])

ipyparallel/tests/test_client.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,23 @@
1010
from concurrent.futures import Future
1111
from datetime import datetime
1212
from threading import Thread
13-
14-
try:
15-
from unittest import mock
16-
except ImportError:
17-
import mock
13+
from unittest import mock
1814

1915
import pytest
2016
import tornado
21-
2217
from IPython import get_ipython
18+
19+
from .clienttest import add_engines
20+
from .clienttest import ClusterTestCase
21+
from .clienttest import skip_without
22+
from .clienttest import wait
23+
from ipyparallel import AsyncHubResult
24+
from ipyparallel import DirectView
25+
from ipyparallel import error
26+
from ipyparallel import Reference
2327
from ipyparallel.client import client as clientmod
24-
from ipyparallel import error, AsyncHubResult, DirectView, Reference
2528
from ipyparallel.util import utc
2629

27-
from .clienttest import ClusterTestCase, wait, add_engines, skip_without
28-
2930

3031
@pytest.mark.usefixtures('ipython')
3132
class TestClient(ClusterTestCase):

ipyparallel/tests/test_joblib.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
try:
2-
from unittest import mock
3-
except ImportError:
4-
import mock
1+
from unittest import mock
52

63
import pytest
74

85
import ipyparallel as ipp
9-
from .clienttest import ClusterTestCase, add_engines
6+
from .clienttest import add_engines
7+
from .clienttest import ClusterTestCase
108

119
try:
1210
import joblib

ipyparallel/tests/test_util.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import socket
2+
from unittest import mock
3+
4+
from jupyter_client.localinterfaces import localhost
5+
from jupyter_client.localinterfaces import public_ips
26

3-
try:
4-
from unittest import mock
5-
except ImportError:
6-
import mock
77
from ipyparallel import util
8-
from jupyter_client.localinterfaces import localhost, public_ips
98

109

1110
@mock.patch('warnings.warn')

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def run(self):
116116
install_requires=[
117117
"ipython_genutils",
118118
"decorator",
119-
"pyzmq>=13",
119+
"pyzmq>=18",
120120
"traitlets>=4.3",
121121
"ipython>=4",
122122
"jupyter_client",
@@ -128,7 +128,7 @@ def run(self):
128128
python_requires=">=3.6",
129129
extras_require={
130130
"nbext": ["notebook"],
131-
"test": ["pytest", "pytest-cov", "ipython[test]", "testpath", "mock"],
131+
"test": ["pytest", "pytest-cov", "pytest-asyncio", "ipython[test]", "testpath"],
132132
},
133133
entry_points={
134134
"console_scripts": [

0 commit comments

Comments
 (0)