travis-ci set to run pep8 tests as part of CI

This commit is contained in:
Chris Caron 2019-02-17 23:28:37 -05:00
parent eb4c83f3f8
commit 75bde9d2a7
10 changed files with 37 additions and 20 deletions

View File

@ -26,7 +26,7 @@ matrix:
install:
- pip install .
- pip install codecov tox
- pip install codecov
- pip install -r dev-requirements.txt
- pip install -r requirements.txt
- if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then travis_retry pip install dbus-python; fi

View File

@ -284,7 +284,7 @@ class NotifyDBus(NotifyBase):
self.logger.info('Sent DBus notification.')
except Exception as e:
except Exception:
self.logger.warning('Failed to send DBus notification.')
self.logger.exception('DBus Exception')
return False

View File

@ -162,7 +162,7 @@ class NotifyGnome(NotifyBase):
notification.show()
self.logger.info('Sent Gnome notification.')
except Exception as e:
except Exception:
self.logger.warning('Failed to send Gnome notification.')
self.logger.exception('Gnome Exception')
return False

View File

@ -173,7 +173,7 @@ class NotifyWindows(NotifyBase):
self.logger.info('Sent Windows notification.')
except Exception as e:
except Exception:
self.logger.warning('Failed to send Windows notification.')
self.logger.exception('Windows Exception')
return False

View File

@ -11,6 +11,12 @@ exclude = .eggs,.tox,gntp,tweepy,pushjet
ignore = E722,W503,W504
statistics = true
[flake8]
# We exclude packages we don't maintain
exclude = .eggs,.tox,gntp,tweepy,pushjet
ignore = E722,W503,W504
statistics = true
[aliases]
test=pytest

View File

@ -274,7 +274,7 @@ def test_email_plugin(mock_smtp, mock_smtpssl):
# Don't mess with these entries
raise
except Exception as e:
except Exception:
# We can't handle this exception type
raise

View File

@ -29,7 +29,6 @@ from apprise import Apprise
from apprise.utils import compat_is_basestring
import mock
import re
TEST_URLS = (
@ -195,7 +194,7 @@ def test_growl_plugin(mock_gntp):
# This is the response we expect
assert True
except Exception as e:
except Exception:
# We can't handle this exception type
assert False

View File

@ -168,7 +168,7 @@ def test_plugin(mock_refresh, mock_send):
# Don't mess with these entries
raise
except Exception as e:
except Exception:
# We can't handle this exception type
raise

View File

@ -1660,7 +1660,7 @@ def test_rest_plugins(mock_post, mock_get):
# Don't mess with these entries
raise
except Exception as e:
except Exception:
# We can't handle this exception type
raise
@ -1697,7 +1697,7 @@ def test_rest_plugins(mock_post, mock_get):
# Don't mess with these entries
raise
except Exception as e:
except Exception:
# We can't handle this exception type
raise

32
tox.ini
View File

@ -10,36 +10,45 @@ setenv =
deps=
-r{toxinidir}/requirements.txt
-r{toxinidir}/dev-requirements.txt
commands = python -m pytest {posargs}
commands =
coverage run --parallel -m pytest {posargs}
flake8 . --count --show-source --statistics
[testenv:py27]
deps=
dbus-python
-r{toxinidir}/requirements.txt
-r{toxinidir}/dev-requirements.txt
commands = coverage run --parallel -m pytest {posargs}
commands =
coverage run --parallel -m pytest {posargs}
flake8 . --count --show-source --statistics
[testenv:py34]
deps=
dbus-python
-r{toxinidir}/requirements.txt
-r{toxinidir}/dev-requirements.txt
commands = coverage run --parallel -m pytest {posargs}
commands =
coverage run --parallel -m pytest {posargs}
flake8 . --count --show-source --statistics
[testenv:py35]
deps=
dbus-python
-r{toxinidir}/requirements.txt
-r{toxinidir}/dev-requirements.txt
commands = coverage run --parallel -m pytest {posargs}
commands =
coverage run --parallel -m pytest {posargs}
flake8 . --count --show-source --statistics
[testenv:py36]
deps=
dbus-python
-r{toxinidir}/requirements.txt
-r{toxinidir}/dev-requirements.txt
commands = coverage run --parallel -m pytest {posargs}
commands =
coverage run --parallel -m pytest {posargs}
flake8 . --count --show-source --statistics
[testenv:py37]
deps=
@ -47,21 +56,24 @@ deps=
-r{toxinidir}/requirements.txt
-r{toxinidir}/dev-requirements.txt
commands =
flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
coverage run --parallel -m pytest {posargs}
flake8 . --count --show-source --statistics
[testenv:pypy]
deps=
-r{toxinidir}/requirements.txt
-r{toxinidir}/dev-requirements.txt
commands = coverage run --parallel -m pytest {posargs}
commands =
coverage run --parallel -m pytest {posargs}
flake8 . --count --show-source --statistics
[testenv:pypy3]
deps=
-r{toxinidir}/requirements.txt
-r{toxinidir}/dev-requirements.txt
commands = coverage run --parallel -m pytest {posargs}
commands =
coverage run --parallel -m pytest {posargs}
flake8 . --count --show-source --statistics
[testenv:coverage-report]
deps = coverage