From 3b7734c32f74e5a9b934196221a96a5de50888d0 Mon Sep 17 00:00:00 2001 From: Isis Lovecruft Date: Tue, 21 May 2013 12:39:01 +0000 Subject: [PATCH] Add doctest for GPG class. --- src/gnupg.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/gnupg.py b/src/gnupg.py index c5c0dcc..0ed263c 100644 --- a/src/gnupg.py +++ b/src/gnupg.py @@ -458,6 +458,26 @@ class GPG(GPGBase): :raises: :exc:`RuntimeError` with explanation message if there is a problem invoking gpg. + + Example: + + >>> import gnupg + GnuPG logging disabled... + >>> gpg = gnupg.GPG(homedir='./test-homedir') + >>> gpg.keyring + './test-homedir/pubring.gpg' + >>> gpg.secring + './test-homedir/secring.gpg' + >>> gpg.use_agent + False + >>> gpg.binary + '/usr/bin/gpg' + >>> import os + >>> import shutil + >>> if os.path.exists('./test-homedir'): + ... shutil.rmtree('./test-homedir') + ... + """ super(GPG, self).__init__(