File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ install:
26
26
- python setup.py install
27
27
script :
28
28
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then flake8 stripe; fi
29
- - python -W all setup.py test
29
+ - python -W all -bb -W error::BytesWarning setup.py test
30
30
matrix :
31
31
allow_failures :
32
32
- python : 3.7-dev
Original file line number Diff line number Diff line change @@ -114,6 +114,9 @@ def dashboard_link(request_id):
114
114
115
115
def logfmt (props ):
116
116
def fmt (key , val ):
117
+ # Handle case where val is a bytes or bytesarray
118
+ if hasattr (val , 'decode' ):
119
+ val = val .decode ('utf-8' )
117
120
# Check if val is already a string to avoid re-encoding into
118
121
# ascii. Since the code is sent through 2to3, we can't just
119
122
# use unicode(val, encoding='utf8') since it will be
Original file line number Diff line number Diff line change 14
14
mock
15
15
commands =
16
16
python setup.py clean --all
17
- python -W all setup.py test {posargs}
17
+ python -W all -bb -W error::BytesWarning setup.py test {posargs}
18
18
setenv =
19
19
STRIPE_TEST_PYCURL = true
20
20
28
28
commands =
29
29
flake8 stripe
30
30
python setup.py clean --all
31
- python -W all setup.py test {posargs}
31
+ python -W all -bb -W error::BytesWarning setup.py test {posargs}
You can’t perform that action at this time.
0 commit comments