summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorAndrey Lebedev <andrey@lebedev.lt>2013-02-19 11:59:47 +0200
committerAndrey Lebedev <andrey@lebedev.lt>2013-02-19 11:59:47 +0200
commitec3ec97c92703bfb7827e7c9472bcbe0f254253e (patch)
tree104824146b2585cf987c2cda77674654d7288132 /setup.py
parent18a6987860cdb622fca9c98fca22692c90fc45f8 (diff)
downloadzope-security-ec3ec97c92703bfb7827e7c9472bcbe0f254253e.tar.gz
More tests are running under python-3
Include documentation doctests into main test suite. Documentation is updated to be valid under python-3 and some critical bugs in python-3 are revealed.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 90d54da..91c43d4 100644
--- a/setup.py
+++ b/setup.py
@@ -32,6 +32,21 @@ TESTS_REQUIRE = [
'zope.location',
]
+def alltests():
+ import os
+ import sys
+ import unittest
+ # use the zope.testrunner machinery to find all the
+ # test suites we've put under ourselves
+ import zope.testrunner.find
+ import zope.testrunner.options
+ here = os.path.abspath(os.path.join(os.path.dirname(__file__), 'src'))
+ args = sys.argv[:]
+ defaults = ["--test-path", here]
+ options = zope.testrunner.options.get_options(args, defaults)
+ suites = list(zope.testrunner.find.find_suites(options))
+ return unittest.TestSuite(suites)
+
here = os.path.abspath(os.path.dirname(__file__))
def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
@@ -130,7 +145,7 @@ setup(name='zope.security',
'zope.proxy >= 4.1.0',
'zope.schema',
],
- test_suite = 'zope.security',
+ test_suite = '__main__.alltests',
tests_require=TESTS_REQUIRE,
extras_require = dict(
pytz=["pytz"],