Skip to content

Commit 97dd4c9

Browse files
authored
Merge pull request #17 from rekcurd/fix/unittest-py37-support
Merged
2 parents f0f48d3 + 2f09085 commit 97dd4c9

11 files changed

Lines changed: 22 additions & 19 deletions

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: python
2-
dist: trusty
2+
dist: xenial
33
sudo: true
44
services:
55
- docker
@@ -9,6 +9,8 @@ matrix:
99
env: TOXENV=py36
1010
- python: 3.6
1111
env: TOXENV=coverage,codecov
12+
- python: 3.7
13+
env: TOXENV=py37
1214
install:
1315
- pip install tox
1416
script:

requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
grpcio==1.13.0
2-
grpcio-tools==1.13.0
3-
fluent-logger==0.9.3
4-
python-json-logger==0.1.9
1+
grpcio>=1.13.0 # Apache-2.0
2+
grpcio-tools>=1.13.0 # Apache-2.0
3+
fluent-logger>=0.9.3 # Apache-2.0
4+
python-json-logger>=0.1.9 # BSD

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,6 @@
7676
"Programming Language :: Python",
7777
"Programming Language :: Python :: 3",
7878
"Programming Language :: Python :: 3.6",
79+
"Programming Language :: Python :: 3.7",
7980
],
8081
)

test-requirements.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
drucker==0.4.4
2-
coverage==4.5.1
3-
nose==1.3.7
1+
drucker>=0.4.0,<0.5.0
2+
coverage>=4.0.3
3+
nose>=1.3.7
44
pytest
5-
py==1.5.4
6-
codecov==2.0.15
7-
grpcio-testing==1.13.0
5+
py>=1.4.31
6+
codecov>=1.4.0
7+
grpcio-testing>=1.13.0
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
from drucker.logger import JsonServiceLogger, JsonSystemLogger
44
import drucker.drucker_worker_servicer
55

6-
from drucker_client.test.dummy_app import DummyApp
6+
from test.dummy_app import DummyApp
77
from drucker_client.logger import logger
88

99

1010
os.environ["DRUCKER_TEST_MODE"] = "True"
11-
os.environ["DRUCKER_SETTINGS_YAML"] = "drucker_client/test/test-settings.yml"
11+
os.environ["DRUCKER_SETTINGS_YAML"] = "test/test-settings.yml"
1212

1313
app = DummyApp()
1414
service_logger = JsonServiceLogger(app.config)
File renamed without changes.

drucker_client/test/test_worker_client_e2e.py renamed to test/test_worker_client_e2e.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ def patch_predictor(input_type, output_type):
2727
def test_method(func):
2828
@wraps(func)
2929
def inner_method(*args, **kwargs):
30-
with patch('drucker_client.test.dummy_app.DummyApp.get_type_input',
30+
with patch('test.dummy_app.DummyApp.get_type_input',
3131
new=Mock(return_value=input_type)) as _, \
32-
patch('drucker_client.test.dummy_app.DummyApp.get_type_output',
32+
patch('test.dummy_app.DummyApp.get_type_output',
3333
new=Mock(return_value=output_type)) as _, \
34-
patch('drucker_client.test.dummy_app.DummyApp.load_model') as _, \
35-
patch('drucker_client.test.dummy_app.DummyApp.predict',
34+
patch('test.dummy_app.DummyApp.load_model') as _, \
35+
patch('test.dummy_app.DummyApp.predict',
3636
new=Mock(return_value=_prediction_value_map[output_type])) as _:
3737
return func(*args, **kwargs)
3838
return inner_method

0 commit comments

Comments
 (0)