From c06af042f8992d8d6abb02a2795b6146c6f32a0e Mon Sep 17 00:00:00 2001 From: J08nY Date: Fri, 2 Jun 2017 19:45:09 +0200 Subject: Add tox for testing, fix py-pgp dependency. --- setup.py | 2 +- src/pgpmailman/plugin.py | 3 +-- src/pgpmailman/rest/root.py | 2 +- tox.ini | 24 ++++++++++++++++++++++++ 4 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 tox.ini diff --git a/setup.py b/setup.py index 65b754b..98a6c2a 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ A plugin for GNU Mailman that adds encrypted mailing lists via PGP/MIME. package_dir={'': 'src'}, install_requires=[ 'mailman>=3.1.0', - 'pgp', + 'py-pgp', 'atpublic', 'zope.interface', ] diff --git a/src/pgpmailman/plugin.py b/src/pgpmailman/plugin.py index 0608bd0..a9b8dd4 100644 --- a/src/pgpmailman/plugin.py +++ b/src/pgpmailman/plugin.py @@ -1,9 +1,8 @@ from mailman.interfaces.plugin import IPlugin +from pgpmailman.rest.root import RESTRoot from public import public from zope.interface import implementer -from pgpmailman.rest.root import RESTRoot - @public @implementer(IPlugin) diff --git a/src/pgpmailman/rest/root.py b/src/pgpmailman/rest/root.py index 69565d8..a0dd3fa 100644 --- a/src/pgpmailman/rest/root.py +++ b/src/pgpmailman/rest/root.py @@ -11,4 +11,4 @@ class RESTRoot: @child() def users(self, context, segments): - pass \ No newline at end of file + pass diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..0a2b462 --- /dev/null +++ b/tox.ini @@ -0,0 +1,24 @@ +[tox] +envlist = qa +skip_missing_interpreters = True + +[testenv] +usedevelop = True +deps = + flufl.testing + nose2 + +[testenv:qa] +basepython = python3 +commands = + python -m flake8 src +deps = + flake8>3.0 + flufl.testing + +[flake8] +enable-extensions = U4 +exclude = src/mailman/compat/*.py +hang-closing = True +jobs = 1 +max-line-length = 79 -- cgit v1.2.3-70-g09d2