Testing
=======
-Run the internal unit tests using nose_::
+Run the internal unit tests with `Python 3.2+'s unittest discovery`__::
- $ nosetests --with-doctest --doctest-tests pyassuan
-
-If a Python-3-version of ``nosetests`` is not the default on your
-system, you may need to try something like::
-
- $ nosetests-3.3 --with-doctest --doctest-tests pyassuan
+ $ python -m unittest discover
To test running servers by hand, you can use `gpg-connect-agent`_.
Despite the name, this program can connect to any Assuan server::
$ gpg-connect-agent --raw-socket name
+__ unittest-discovery_
+
Licence
=======
.. _wtk overlay: http://blog.tremily.us/posts/Gentoo_overlay/
.. _Git: http://git-scm.com/
.. _homepage: http://blog.tremily.us/posts/pyassuan/
-.. _nose: http://readthedocs.org/docs/nose/en/latest/
.. _gpg-connect-agent:
http://www.gnupg.org/documentation/manuals/gnupg-devel/gpg_002dconnect_002dagent.html
+.. _unittest-discovery:
+ https://docs.python.org/3.5/library/unittest.html#unittest-test-discovery
.. _GNU General Public License Version 3: http://www.gnu.org/licenses/gpl.html
--- /dev/null
+# Copyright (C) 2018 W. Trevor King <wking@tremily.us>
+#
+# This file is part of pyassuan.
+#
+# pyassuan is free software: you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation, either version 3 of the License, or (at your option) any later
+# version.
+#
+# pyassuan is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# pyassuan. If not, see <http://www.gnu.org/licenses/>.
+
+import doctest
+import unittest
+
+from . import common
+
+
+def load_tests(loader, tests, ignore):
+ tests.addTests(doctest.DocTestSuite(common))
+ return tests
--- /dev/null
+# Copyright (C) 2018 W. Trevor King <wking@tremily.us>
+#
+# This file is part of pyassuan.
+#
+# pyassuan is free software: you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation, either version 3 of the License, or (at your option) any later
+# version.
+#
+# pyassuan is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# pyassuan. If not, see <http://www.gnu.org/licenses/>.
+
+import doctest
+import unittest
+
+from . import error
+
+
+def load_tests(loader, tests, ignore):
+ tests.addTests(doctest.DocTestSuite(error))
+ return tests
--- /dev/null
+# Copyright (C) 2018 W. Trevor King <wking@tremily.us>
+#
+# This file is part of pyassuan.
+#
+# pyassuan is free software: you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation, either version 3 of the License, or (at your option) any later
+# version.
+#
+# pyassuan is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# pyassuan. If not, see <http://www.gnu.org/licenses/>.
+
+import doctest
+import unittest
+
+from . import server
+
+
+def load_tests(loader, tests, ignore):
+ tests.addTests(doctest.DocTestSuite(server))
+ return tests