diff options
author | Jason Madden <jamadden@gmail.com> | 2020-01-20 07:13:12 -0600 |
---|---|---|
committer | Jason Madden <jamadden@gmail.com> | 2020-01-20 07:13:12 -0600 |
commit | f3c34bcc21852b23116872dbd9edeee6405be681 (patch) | |
tree | 1fe67db2298080c911d69b0e65a42d5c0220e403 | |
parent | 3c0f7dcc4a6efed580af517431096200ebeeadb9 (diff) | |
download | zope-i18nmessageid-f3c34bcc21852b23116872dbd9edeee6405be681.tar.gz |
Update tests_require and 'test' extra.
Don't install nose, upstream no longer supports. We were actually testing with zope.testrunner on travis and in tox.ini so use that.
make appveyor do the same.
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | appveyor.yml | 4 | ||||
-rw-r--r-- | setup.py | 29 | ||||
-rw-r--r-- | tox.ini | 8 |
4 files changed, 20 insertions, 23 deletions
diff --git a/.travis.yml b/.travis.yml index 08ccae0..c8eb5b5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -65,7 +65,7 @@ before_install: install: - pip install -U pip setuptools - - pip install -U coveralls coverage zope.testrunner + - pip install -U coveralls - pip install -U -e ".[test]" script: diff --git a/appveyor.yml b/appveyor.yml index d643125..fd5033a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -26,14 +26,14 @@ install: } - ps: if (-not (Test-Path $env:PYTHON)) { throw "No $env:PYTHON" } - echo "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 > "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\vcvars64.bat" - - pip install -e . + - pip install -e .[test] build_script: - pip install wheel - python -W ignore setup.py -q bdist_wheel test_script: - - python setup.py test -q + - zope-testrunner --test-path=src artifacts: - path: 'dist\*.whl' @@ -18,6 +18,7 @@ ############################################################################## """Setup for zope.i18nmessageid package """ +from __future__ import print_function import os import sys @@ -43,10 +44,6 @@ codeoptimization = [ ), ] -extra = { - -} - ext_modules = [] if not is_pypy and not is_jython: # Jython cannot build the C optimizations, while on PyPy they are @@ -55,6 +52,11 @@ if not is_pypy and not is_jython: ext_modules = codeoptimization +tests_require = [ + 'zope.testrunner', + 'coverage', +] + def read(*rnames): with open(os.path.join(os.path.dirname(__file__), *rnames)) as stream: return stream.read() @@ -77,18 +79,17 @@ class optional_build_ext(build_ext): self._unavailable(e) def _unavailable(self, e): - # Write directly to stderr to preserve compatibility with both - # Python 2.5 and 3.x, which is needed in setup.py. - sys.stderr.write('*' * 80 + '\n') - sys.stderr.write("""WARNING: + print('*' * 80, file=sys.stderr) + print("""WARNING: An optional code optimization (C extension) could not be compiled. Optimizations for this package will not be available! - """) - sys.stderr.write(str(e) + '\n') - sys.stderr.write('*' * 80 + '\n') + """, file=sys.stderr) + print(str(e), file=sys.stderr) + print('*' * 80, file=sys.stderr) + setup( @@ -134,10 +135,10 @@ setup( zip_safe=False, cmdclass={'build_ext': optional_build_ext}, ext_modules=ext_modules, + tests_require=tests_require, extras_require={ - 'testing': [ - 'nose', 'coverage' - ], + 'testing': tests_require, + 'test': tests_require, 'docs': ['Sphinx'], }, ) @@ -5,7 +5,6 @@ envlist = [testenv] deps = .[test] - zope.testrunner commands = zope-testrunner --test-path=src [] @@ -15,11 +14,8 @@ usedevelop = true basepython = python2.7 commands = - nosetests --with-xunit --with-xcoverage -deps = - nose - coverage - nosexcover + coverage run -m zope.testrunner --test-path=src [] + coverage report --fail-under=100 [testenv:docs] basepython = |