1
0
mirror of https://github.com/httpie/cli.git synced 2024-12-02 08:52:00 +02:00

Merge pull request #493 from medecau/codestyle_environment

Codestyle environment
This commit is contained in:
Jakub Roztočil 2016-07-29 23:17:00 +02:00 committed by GitHub
commit ee375b6942
5 changed files with 28 additions and 6 deletions

View File

@ -45,6 +45,11 @@ matrix:
- TOXENV=py35
- BREW_INSTALL=python3
# Python Codestyle
- os: linux
python: 3.5
env: CODESTYLE=true
install:
- |
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
@ -54,11 +59,20 @@ install:
fi
sudo pip install tox
fi
if [[ $CODESTYLE ]]; then
pip install pycodestyle
fi
script:
- |
if [[ $TRAVIS_OS_NAME == 'linux' ]]; then
if [[ $CODESTYLE ]]; then
# 241 - multiple spaces after ‘,’
# 501 - line too long
pycodestyle --ignore=E241,E501
else
make
fi
else
PATH="/usr/local/bin:$PATH" tox -e "$TOXENV"
fi

View File

@ -108,8 +108,8 @@ class TestItemParsing:
# Parsed file fields
assert 'file' in items.files
assert (items.files['file'][1].read().strip().decode('utf8')
== FILE_CONTENT)
assert (items.files['file'][1].read().strip().
decode('utf8') == FILE_CONTENT)
def test_multiple_file_fields_with_same_field_name(self):
items = input.parse_items([

10
tox.ini
View File

@ -3,7 +3,7 @@
[tox]
envlist = py26, py27, py35, pypy
envlist = py26, py27, py35, pypy, codestyle
[testenv]
@ -20,3 +20,11 @@ commands =
--verbose \
--doctest-modules \
{posargs:./httpie ./tests}
[testenv:codestyle]
deps = pycodestyle
commands =
pycodestyle \
--ignore=E241,E501
# 241 - multiple spaces after ‘,’
# 501 - line too long