mirror of
https://github.com/caronc/apprise.git
synced 2025-01-03 20:49:19 +01:00
travis-ci set to run pep8 tests as part of CI
This commit is contained in:
parent
eb4c83f3f8
commit
75bde9d2a7
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
32
tox.ini
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user