--- /dev/null
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+'''
+@author: Frank Brehm
+@contact: frank.brehm@pixelpark.com
+@copyright: © 2021 Frank Brehm, Digitas Pixelpark GmbH Berlin
+@license: LGPL3
+@summary: test script (and module) for unit tests on mailaddress class and objects
+'''
+
+import os
+import sys
+import logging
+
+try:
+ import unittest2 as unittest
+except ImportError:
+ import unittest
+
+libdir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'lib'))
+sys.path.insert(0, libdir)
+
+from general import PpAdminToolsTestcase, get_arg_verbose, init_root_logger
+
+LOG = logging.getLogger('test_mailaddress')
+
+
+# =============================================================================
+class TestMailaddress(PpAdminToolsTestcase):
+
+ # -------------------------------------------------------------------------
+ def setUp(self):
+ pass
+
+ # -------------------------------------------------------------------------
+ def test_import(self):
+
+ LOG.info("Testing import of pp_admintools.mailaddress ...")
+ import pp_admintools.mailaddress
+ LOG.debug("Version of pp_admintools.mailaddress: {!r}".format(
+ pp_admintools.mailaddress.__version__))
+
+ # -------------------------------------------------------------------------
+ def test_object(self):
+
+ LOG.info("Testing init of a simple mailaddress object.")
+
+ from pp_admintools.mailaddress import MailAddress
+
+ obj = MailAddress('frank.brehm@pixelpark.com')
+ LOG.debug("MailAddress %%r: %r", obj)
+ LOG.debug("MailAddress %%s: %s", str(obj))
+
+
+# =============================================================================
+if __name__ == '__main__':
+
+ verbose = get_arg_verbose()
+ if verbose is None:
+ verbose = 0
+ init_root_logger(verbose)
+
+ LOG.info("Starting tests ...")
+
+ suite = unittest.TestSuite()
+
+ suite.addTest(TestMailaddress('test_import', verbose))
+ suite.addTest(TestMailaddress('test_object', verbose))
+
+ runner = unittest.TextTestRunner(verbosity=verbose)
+
+ result = runner.run(suite)
+
+
+# =============================================================================
+
+# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4