PageRenderTime 42ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/gdata/Crypto/test.py

https://bitbucket.org/gbc/website-gb-consulting-courtesy-site-gpress-light
Python | 38 lines | 22 code | 12 blank | 4 comment | 7 complexity | 623b8d4620a9dbee27e41063f8933f80 MD5 | raw file
  1. #
  2. # Test script for the Python Cryptography Toolkit.
  3. #
  4. __revision__ = "$Id: test.py,v 1.7 2002/07/11 14:31:19 akuchling Exp $"
  5. import os, sys
  6. # Add the build directory to the front of sys.path
  7. from distutils.util import get_platform
  8. s = "build/lib.%s-%.3s" % (get_platform(), sys.version)
  9. s = os.path.join(os.getcwd(), s)
  10. sys.path.insert(0, s)
  11. s = os.path.join(os.getcwd(), 'test')
  12. sys.path.insert(0, s)
  13. from Crypto.Util import test
  14. args = sys.argv[1:]
  15. quiet = "--quiet" in args
  16. if quiet: args.remove('--quiet')
  17. if not quiet:
  18. print '\nStream Ciphers:'
  19. print '==============='
  20. if args: test.TestStreamModules(args, verbose= not quiet)
  21. else: test.TestStreamModules(verbose= not quiet)
  22. if not quiet:
  23. print '\nBlock Ciphers:'
  24. print '=============='
  25. if args: test.TestBlockModules(args, verbose= not quiet)
  26. else: test.TestBlockModules(verbose= not quiet)