diff --git a/test/basic_doctest.py b/test/basic_doctest.py new file mode 100644 index 0000000..5894a01 --- /dev/null +++ b/test/basic_doctest.py @@ -0,0 +1,23 @@ +""" +>>> from pEp import * +>>> m = outgoing_message(Identity("vb@dingens.org", "Volker Birk")) +>>> m.to = [Identity("trischa@dingens.org", "Patricia Bednar")] +>>> m.shortmsg = "Hello" +>>> m.longmsg = "Something\\n" +>>> print(str(m).replace('\\r', '')) +From: Volker Birk +To: Patricia Bednar +Subject: Hello +MIME-Version: 1.0 +Content-Type: text/plain; charset="utf-8" +Content-Transfer-Encoding: quoted-printable +Content-Disposition: inline; filename="msg.txt" + +Something + +>>> +""" + +if __name__ == "__main__": + import doctest + doctest.testmod() diff --git a/test/sync_test.py b/test/sync_test.py index a737cec..6467f84 100644 --- a/test/sync_test.py +++ b/test/sync_test.py @@ -19,3 +19,5 @@ class Handler(SyncMixIn): handler = Handler() +# this is an interactive test, so start it with python -i +