Skip to content

Commit ff4aa86

Browse files
authored
change: Fix py2 test environment. (#42)
1 parent e110e37 commit ff4aa86

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ test/resources/local_mode_lock
66
__pycache__/
77
.idea/
88
.DS_Store
9+
**/*.pyc
10+
**.pyc

tox.ini

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,25 @@ exclude =
1818
lib/
1919
max-complexity = 10
2020
ignore =
21+
C901,
22+
E203, # whitespace before ':': Black disagrees with and explicitly violates this.
2123
FI10,
2224
FI12,
2325
FI13,
2426
FI14,
2527
FI15,
2628
FI16,
2729
FI17,
28-
FI18,
30+
FI18, # __future__ import "annotations" missing -> check only Python 3.7 compatible
2931
FI50,
3032
FI51,
3133
FI52,
3234
FI53,
3335
FI54,
3436
FI55,
3537
FI56,
36-
FI57
38+
FI57,
39+
W503
3740
require-code = True
3841

3942
[testenv]
@@ -46,8 +49,8 @@ passenv =
4649
AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
4750
AWS_DEFAULT_REGION
4851
commands =
49-
coverage run --source sagemaker_pytorch_serving_container -m py.test test/unit {posargs}
50-
coverage report
52+
coverage run --source sagemaker_pytorch_serving_container -m pytest {posargs}
53+
{env:IGNORE_COVERAGE:} coverage report --fail-under=90 --include *sagemaker_pytorch_serving_container*
5154
deps =
5255
coverage
5356
pytest
@@ -62,6 +65,7 @@ deps =
6265
torchvision
6366
retrying
6467
six
68+
future
6569

6670
[testenv:flake8]
6771
basepython = python

0 commit comments

Comments
 (0)