Skip to content

Commit 43f9afd

Browse files
authored
Merge pull request #28 from rekcurd/fix/unittest-py37-support
Thank you @yuki-mt ! Merged
2 parents 017ddec + 5ac087c commit 43f9afd

10 files changed

Lines changed: 23 additions & 20 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: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
fluent-logger==0.9.3
2-
python-json-logger==0.1.9
3-
grpcio==1.13.0
4-
grpcio-tools==1.13.0
5-
PyMySQL==0.8.0
6-
SQLAlchemy==1.2.7
7-
PyYAML==3.12
1+
fluent-logger>=0.9.3 # Apache-2.0
2+
python-json-logger>=0.1.9 # BSD
3+
grpcio>=1.13.0 # Apache-2.0
4+
grpcio-tools>=1.13.0 # Apache-2.0
5+
PyMySQL>=0.8.0 # MIT
6+
SQLAlchemy>=1.2.7 # MIT
7+
PyYAML>=3.12 # MIT

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: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
coverage==4.5.1
2-
nose==1.3.7
1+
coverage>=4.0.3
2+
nose>=1.3.7
33
pytest
4-
py==1.5.4
5-
codecov==2.0.15
6-
grpcio-testing==1.13.0
4+
py>=1.4.31
5+
codecov>=1.4.0
6+
grpcio-testing>=1.13.0
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import os
22

33
from drucker.logger import JsonServiceLogger, JsonSystemLogger
4-
from drucker.test.dummy_app import DummyApp
4+
from test.dummy_app import DummyApp
55
import drucker.drucker_worker_servicer
66

77

88
os.environ["DRUCKER_TEST_MODE"] = "True"
9-
os.environ["DRUCKER_SETTINGS_YAML"] = "drucker/test/test-settings.yml"
9+
os.environ["DRUCKER_SETTINGS_YAML"] = "test/test-settings.yml"
1010

1111
app = DummyApp()
1212
service_logger = JsonServiceLogger(app.config)
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ def patch_predictor(input_type, output_type):
3030
def test_method(func):
3131
@wraps(func)
3232
def inner_method(*args, **kwargs):
33-
with patch('drucker.test.dummy_app.DummyApp.get_type_input',
33+
with patch('test.dummy_app.DummyApp.get_type_input',
3434
new=Mock(return_value=input_type)) as _, \
35-
patch('drucker.test.dummy_app.DummyApp.get_type_output',
35+
patch('test.dummy_app.DummyApp.get_type_output',
3636
new=Mock(return_value=output_type)) as _, \
37-
patch('drucker.test.dummy_app.DummyApp.load_model') as _, \
38-
patch('drucker.test.dummy_app.DummyApp.predict',
37+
patch('test.dummy_app.DummyApp.load_model') as _, \
38+
patch('test.dummy_app.DummyApp.predict',
3939
new=Mock(return_value=_prediction_value_map[output_type])) as _:
4040
return func(*args, **kwargs)
4141
return inner_method

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py36
2+
envlist = py36, py37
33

44
[testenv]
55
passenv = TOXENV CI TRAVIS TRAVIS_*

0 commit comments

Comments
 (0)