def main(args): if not args.quiet: log = _logger.create_logger(9) log.setLevel(9) loader = unittest.TestLoader() def _createTests(prog): load_tests = list() if args.test is not None: for suite in args.test: if suite in args.suites.keys(): log.debug("Adding %d items from test suite '%s':" % (len(args.suites[suite]), suite)) for method in args.suites[suite]: load_tests.append(method) log.debug("\t%s" % method) else: log.debug("Ignoring unknown test suite %r" % suite) tests = unittest.TestSuite(list(map(GPGTestCase, load_tests))) else: tests = prog.testLoader.loadTestsFromTestCase(GPGTestCase) args.run_doctest = True if args.run_doctest: tests.addTest(doctest.DocTestSuite(gnupg)) log.debug("Loaded %d tests..." % tests.countTestCases()) prog.test = tests runner = unittest.TextTestRunner(verbosity=args.verbose, stream=sys.stderr) runner.resultclass = unittest.TextTestResult prog = unittest.TestProgram prog.createTests = _createTests program = prog(module=GPGTestCase, testRunner=runner, testLoader=loader, verbosity=args.verbose, catchbreak=True) ## Finally, remove our testing directory: if not RETAIN_TEST_DIRS: if os.path.isdir(_tempd): shutil.rmtree(_tempd)
:copyright: (c) 2013 Isis Agora Lovecruft """ from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import os import logging import gnupg from gnupg import _logger # Set up logging: log = _logger.create_logger(9) log.setLevel(9) #――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # Settings # # You probably want to edit the following variables. Ones which are currently # set to strings are necessary; the ones which are set to `None` are optional. # The directory to use as the homedir for GnuPG (it will contain the # secring.gpg and pubring.gpg, etc.) NEWKEY_DIR = './8192-bit-key' # The name you go by, as it should appear in the primary keyid, i.e. "Evey # Hammond":
:license: MIT license :copyright: (c) 2013 Isis Agora Lovecruft """ from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import logging import gnupg import sys from gnupg import _logger # Set up logging: log = _logger.create_logger(9) log.setLevel(9) #――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # Settings # # You probably want to edit the following variables. Ones which are currently # set to strings are necessary; the ones which are set to `None` are optional. # The directory to use as the homedir for GnuPG (it will contain the # secring.gpg and pubring.gpg, etc.) NEWKEY_DIR = './8192-bit-key' # The name you go by, as it should appear in the primary keyid, i.e. "Evey # Hammond": NAME = 'Someone'