forked from extern/httpie-cli
Merge pull request #493 from medecau/codestyle_environment
Codestyle environment
This commit is contained in:
commit
ee375b6942
14
.travis.yml
14
.travis.yml
@ -45,6 +45,11 @@ matrix:
|
|||||||
- TOXENV=py35
|
- TOXENV=py35
|
||||||
- BREW_INSTALL=python3
|
- BREW_INSTALL=python3
|
||||||
|
|
||||||
|
# Python Codestyle
|
||||||
|
- os: linux
|
||||||
|
python: 3.5
|
||||||
|
env: CODESTYLE=true
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- |
|
- |
|
||||||
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
|
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
|
||||||
@ -54,11 +59,20 @@ install:
|
|||||||
fi
|
fi
|
||||||
sudo pip install tox
|
sudo pip install tox
|
||||||
fi
|
fi
|
||||||
|
if [[ $CODESTYLE ]]; then
|
||||||
|
pip install pycodestyle
|
||||||
|
fi
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- |
|
- |
|
||||||
if [[ $TRAVIS_OS_NAME == 'linux' ]]; then
|
if [[ $TRAVIS_OS_NAME == 'linux' ]]; then
|
||||||
|
if [[ $CODESTYLE ]]; then
|
||||||
|
# 241 - multiple spaces after ‘,’
|
||||||
|
# 501 - line too long
|
||||||
|
pycodestyle --ignore=E241,E501
|
||||||
|
else
|
||||||
make
|
make
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
PATH="/usr/local/bin:$PATH" tox -e "$TOXENV"
|
PATH="/usr/local/bin:$PATH" tox -e "$TOXENV"
|
||||||
fi
|
fi
|
||||||
|
@ -108,8 +108,8 @@ class TestItemParsing:
|
|||||||
|
|
||||||
# Parsed file fields
|
# Parsed file fields
|
||||||
assert 'file' in items.files
|
assert 'file' in items.files
|
||||||
assert (items.files['file'][1].read().strip().decode('utf8')
|
assert (items.files['file'][1].read().strip().
|
||||||
== FILE_CONTENT)
|
decode('utf8') == FILE_CONTENT)
|
||||||
|
|
||||||
def test_multiple_file_fields_with_same_field_name(self):
|
def test_multiple_file_fields_with_same_field_name(self):
|
||||||
items = input.parse_items([
|
items = input.parse_items([
|
||||||
|
10
tox.ini
10
tox.ini
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
|
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py26, py27, py35, pypy
|
envlist = py26, py27, py35, pypy, codestyle
|
||||||
|
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
@ -20,3 +20,11 @@ commands =
|
|||||||
--verbose \
|
--verbose \
|
||||||
--doctest-modules \
|
--doctest-modules \
|
||||||
{posargs:./httpie ./tests}
|
{posargs:./httpie ./tests}
|
||||||
|
|
||||||
|
[testenv:codestyle]
|
||||||
|
deps = pycodestyle
|
||||||
|
commands =
|
||||||
|
pycodestyle \
|
||||||
|
--ignore=E241,E501
|
||||||
|
# 241 - multiple spaces after ‘,’
|
||||||
|
# 501 - line too long
|
||||||
|
Loading…
Reference in New Issue
Block a user