Skip to content

Commit

Permalink
Enable pep8 checks via travis
Browse files Browse the repository at this point in the history
  • Loading branch information
kormoc committed Jan 2, 2015
1 parent b994230 commit 676bd94
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
10 changes: 8 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ python:
# - "2.5"
- "2.6"
- "2.7"

# command to install dependencies, e.g. pip install -r requirements.txt
install: pip install -r .travis.requirements.txt
install:
- pip install -r .travis.requirements.txt
- pip install pep8==1.4.6

# command to run tests, e.g. python setup.py test
script: python test.py
script:
- python test.py
- pep8 --config=.pep8 src bin/diamond bin/diamond-setup build_doc.py setup.py test.py

notifications:
email:
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ def pkgPath(root, path, rpath="/"):
return
files = []
for spath in os.listdir(path):
# Ignore test directories
if spath == 'test':
# ignore test directories
continue
subpath = os.path.join(path, spath)
spath = os.path.join(rpath, spath)
Expand Down Expand Up @@ -144,6 +144,5 @@ def pkgPath(root, path, rpath="/"):
scripts=['bin/diamond', 'bin/diamond-setup'],
data_files=data_files,
install_requires=install_requires,
#test_suite='test.main',
** setup_kwargs
)
3 changes: 0 additions & 3 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ def assertPublished(self, mock, key, value, expected_value=1):
message = '%s: actual %r, expected %r' % (key,
actual_value,
expected_value)
#print message

if precision is not None:
self.assertAlmostEqual(float(actual_value),
Expand Down Expand Up @@ -211,7 +210,6 @@ def assertPublishedMetric(self, mock, key, value, expected_value=1):
message = '%s: actual %r, expected %r' % (key,
actual_value,
expected_value)
#print message

if precision is not None:
self.assertAlmostEqual(float(actual_value),
Expand Down Expand Up @@ -250,7 +248,6 @@ def getCollectorTests(path):
globals(),
locals(),
['*'])
#print "Imported module: %s" % (modname)
except Exception:
print "Failed to import module: %s. %s" % (
modname, traceback.format_exc())
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ deps = {[testenv]deps}

[testenv:pep8]
deps = pep8==1.4.6
commands = pep8 --max-line-length=80 --repeat --show-source src setup.py bin/diamond bin/diamond-setup test.py build_doc.py
commands = pep8 --config=.pep8 src bin/diamond bin/diamond-setup build_doc.py setup.py test.py

[testenv:pyflakes]
deps = pyflakes==0.8.1
Expand Down

0 comments on commit 676bd94

Please sign in to comment.