Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

renamed directory to 'ecdsa', renamed package to 'python-ecdsa', remo…

…ved 'setup.py test'
  • Loading branch information...
commit 6657615f1dc79f9bdf288e25a845ca9790515b8e 1 parent 659e4f4
@warner authored
View
0  pyecdsa/__init__.py → ecdsa/__init__.py
File renamed without changes
View
0  pyecdsa/curves.py → ecdsa/curves.py
File renamed without changes
View
0  pyecdsa/der.py → ecdsa/der.py
File renamed without changes
View
0  pyecdsa/ecdsa.py → ecdsa/ecdsa.py
File renamed without changes
View
0  pyecdsa/ellipticcurve.py → ecdsa/ellipticcurve.py
File renamed without changes
View
0  pyecdsa/keys.py → ecdsa/keys.py
File renamed without changes
View
0  pyecdsa/numbertheory.py → ecdsa/numbertheory.py
File renamed without changes
View
0  pyecdsa/test_pyecdsa.py → ecdsa/test_pyecdsa.py
File renamed without changes
View
0  pyecdsa/util.py → ecdsa/util.py
File renamed without changes
View
53 setup.py
@@ -1,57 +1,18 @@
#!/usr/bin/env python
-import glob, os, sys, unittest
-from distutils.core import setup, Command
+from distutils.core import setup
-class test(Command):
- description =" Run the test suite"
- user_options = []
+# to run unit tests, do this:
+# python ecdsa/ecdsa.py # look for *** failures messages
+# python ecdsa/test_pyecdsa.py # look for "Failure:" messages
- def initialize_options(self):
- self.test_dirs = None
- def finalize_options(self):
- if self.test_dirs is None:
- self.test_dirs = ["pyecdsa"]
-
- def run(self):
- testsRun = errors = failures = 0
- for dir in self.test_dirs:
- for filename in glob.glob(os.path.join(dir, "test_*.py")):
- self.announce("running test from " + filename)
- info = self._run_test(filename)
- errors = errors + info[0]
- failures = failures + info[1]
- testsRun = testsRun + info[2]
- if errors or failures:
- print "%d errors and %d failures, %d tests run" % \
- (errors, failures, testsRun)
- sys.exit(1)
- else:
- print "All %d tests passed" % testsRun
-
- def _run_test(self, filename):
- # make sure the file's directory is on sys.path so we can import.
- dirname, basename = os.path.split(filename)
- sys.path.insert(0, dirname)
- try:
- modname = os.path.splitext(basename)[0]
- mod = __import__(modname)
- suite = unittest.defaultTestLoader.loadTestsFromModule(mod)
- runner = unittest.TextTestRunner(stream=open("/dev/null", 'w'))
- results = runner.run(suite)
- return len(results.errors), len(results.failures), results.testsRun
- finally:
- if sys.path[0] == dirname:
- del sys.path[0]
-
-
-setup(name="pyecdsa",
+setup(name="ecdsa",
version="x",
description="ECDSA cryptographic signature library (pure python)",
author="Brian Warner",
author_email="warner-pyecdsa@lothar.com",
- url="http://github.com/warner/pyecdsa",
- packages=["pyecdsa"],
+ url="http://github.com/warner/python-ecdsa",
+ packages=["ecdsa"],
license="MIT",
cmdclass={ "test": test },
)
Please sign in to comment.
Something went wrong with that request. Please try again.