Add pep8 checks

Change-Id: Id36116a8a55cf5205634a75c8cc414e96145872a
This commit is contained in:
Monty Taylor 2013-08-02 13:56:32 -04:00
parent ba70d3c121
commit 36ca418e1b
4 changed files with 14 additions and 5 deletions

View File

@ -1,3 +1,4 @@
hacking>=0.5.6,<0.7
testrepository>=0.0.17
testscenarios>=0.4,<0.5
testtools>=0.9.32

View File

@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from setuptools import setup, find_packages
import setuptools
from swift import __canonical_version__ as version
@ -26,7 +26,7 @@ with open('requirements.txt', 'r') as f:
requires = [x.strip() for x in f if x.strip()]
setup(
setuptools.setup(
name=name,
version=version,
description='Swift',
@ -34,7 +34,7 @@ setup(
author='OpenStack, LLC.',
author_email='openstack-admins@lists.launchpad.net',
url='https://launchpad.net/swift',
packages=find_packages(exclude=['test', 'bin']),
packages=setuptools.find_packages(exclude=['test', 'bin']),
test_suite='nose.collector',
classifiers=[
'Development Status :: 5 - Production/Stable',

View File

@ -14,6 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
import os
import os.path
import shutil
@ -26,7 +28,7 @@ import testtools
def _file_to_list(fname):
with open(fname) as f:
content = map(lambda x: x.rstrip(), f.readlines())
print content
print(content)
return content

View File

@ -1,5 +1,5 @@
[tox]
envlist = py27
envlist = py27,pep8
[testenv]
setenv = VIRTUAL_ENV={envdir}
@ -10,3 +10,9 @@ deps = -U
-r{toxinidir}/test-requirements.txt
commands =
python setup.py testr --slowest --testr-args='{posargs}'
[testenv:pep8]
commands = flake8
[flake8]
exclude = .venv,.git,.tox,dist,doc,*egg,build