Add doctest for GPG class.

testing/mmn/mktime_takes_localtime_not_gmtime
Isis Lovecruft 2013-05-21 12:39:01 +00:00
parent 5891730de4
commit 3b7734c32f
No known key found for this signature in database
GPG Key ID: A3ADB67A2CDB8B35
1 changed files with 20 additions and 0 deletions

View File

@ -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__(