diff --git a/.travis.yml b/.travis.yml index 745794152942..e643ecc6171e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,4 +9,5 @@ script: - tox -e py27 after_success: - tox -e cover + - tox -e lint - coveralls diff --git a/gcloud/test_connection.py b/gcloud/test_connection.py index 1a9b274e91a5..1ea354b89f93 100644 --- a/gcloud/test_connection.py +++ b/gcloud/test_connection.py @@ -46,6 +46,7 @@ def authorize(self, http): def test_user_agent_format(self): from pkg_resources import get_distribution - expected_ua = 'gcloud-python/{0}'.format(get_distribution('gcloud').version) - conn = self._makeOne() + expected_ua = 'gcloud-python/{0}'.format( + get_distribution('gcloud').version) + conn = self._makeOne() self.assertEqual(conn.USER_AGENT, expected_ua) diff --git a/tox.ini b/tox.ini index 3634f0cbd27f..dad00b1bb22d 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py26,py27,cover,docs + py26,py27,cover,docs,lint [testenv] commands = @@ -28,3 +28,15 @@ commands = sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html deps = Sphinx + +[pep8] +exclude = gcloud/datastore/datastore_v1_pb2.py,docs/conf.py,*.egg/,.*/ +verbose = 1 + +[testenv:lint] +basepython = + python2.7 +commands = + pep8 +deps = + pep8