Skip to content

Commit

Permalink
Drop support for running the tests using python setup.py test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Oct 2, 2020
1 parent bab0028 commit f6336f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Changes
4.2.1 (unreleased)
------------------

- Nothing changed yet.
- Drop support for running the tests using ``python setup.py test``.


4.2.0 (2017-07-25)
Expand Down
19 changes: 2 additions & 17 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,16 @@
from setuptools import setup, find_packages
import os.path


def read(*path):
with open(os.path.join(*path)) as f:
return f.read() + '\n\n'

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)

long_description = '\n\n'.join([
read('README.rst'),
read('CHANGES.rst')
])
])

tests_require = [
'zope.testing >= 3.8',
Expand Down Expand Up @@ -98,8 +85,6 @@ def alltests():
'zope.schema',
'zope.security[zcml]>=3.8',
],
test_suite='__main__.alltests',
tests_require=tests_require,
extras_require={
'testing': tests_require,
'test': tests_require,
Expand Down

0 comments on commit f6336f2

Please sign in to comment.