Hello community,
here is the log from the commit of package python-detox for openSUSE:Factory checked in at 2019-01-03 18:07:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-detox (Old)
and /work/SRC/openSUSE:Factory/.python-detox.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-detox"
Thu Jan 3 18:07:37 2019 rev:8 rq:662369 version:0.18
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-detox/python-detox.changes 2018-09-19 14:31:47.527367406 +0200
+++ /work/SRC/openSUSE:Factory/.python-detox.new.28833/python-detox.changes 2019-01-03 18:07:42.408082854 +0100
@@ -1,0 +2,37 @@
+Wed Jan 2 07:36:18 UTC 2019 - Thomas Bechtold
From bff058fb50de66f0ce57a6dbc548f9b069fea0f4 Mon Sep 17 00:00:00 2001 From: Thomas Bechtold
Date: Wed, 2 Jan 2019 08:45:39 +0100 Subject: [PATCH] Specify encoding when reading README and CHANGELOG
Otherwise, calling "setup.py build" can fail with: Traceback (most recent call last): File "setup.py", line 15, in <module> long_description=make_long_description(), File "setup.py", line 8, in make_long_description changelog = f.read() File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position \ 2208: ordinal not in range(128) --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 96b1176..e9f5564 100644 --- a/setup.py +++ b/setup.py @@ -1,10 +1,11 @@ +import io from setuptools import setup def make_long_description(): - with open("README.md") as f: + with io.open("README.md", encoding='UTF-8') as f: readme = f.read() - with open("CHANGELOG") as f: + with io.open("CHANGELOG", encoding='UTF-8') as f: changelog = f.read() return readme + "\n\n" + changelog -- 2.20.1 ++++++ detox-0.13.tar.gz -> detox-0.18.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/detox-0.13/CHANGELOG new/detox-0.18/CHANGELOG --- old/detox-0.13/CHANGELOG 2018-08-20 17:51:42.000000000 +0200 +++ new/detox-0.18/CHANGELOG 2018-11-04 18:06:44.000000000 +0100 @@ -1,73 +1,118 @@ -0.13.0 ------------------------ -- (fix `#283 https://github.com/tox-dev/tox/issues/283`_) detox creates virtualenvs - repeatedly and unnecessarily - by Thomas Steinke +# CHANGELOG -0.12.0 ------------------------ +## 0.18 -- (fix `#792 https://github.com/tox-dev/tox/issues/792`_) bump tox version constraint - to <4.0 - by Pi Delport -- support and test with Python 2.7, 3.4+ - by Miro Hrončok -- fix project url to point ot github - by Neil Halelamien -- remove some unused imports - by Nir Soffer +Note that usedevlop still does not seem to be fixed (PRs welcome) +- integrate usable fixes from stale PR7 + - (fix [#20](https://github.com/tox-dev/detox/issues/20) detox + ignores/breaks usedevelop - by Kendall Chuang + - (fix [#21](https://github.com/tox-dev/detox/issues/21) + detox doesn't support skipsdist config option - by Kendall Chuang +- convert changelog to markdown and render as part of description on PyPI +- detox version now prints own version and then what tox has to say + (it's a plugin after all and that should be made clear) +- [Internal changes] + - add extra dependencies in setup.py + - update tests to current pytest API + - use black for code formatting + - use flake8 for linting + - add descriptions to tox envs + - add a "dev" tox env -0.11.0 ------------------------ +## 0.17 (botched release) +## 0.16 (not released) -- #406: Add support for running detox as python -m detox - Thanks André Caron (@AndreLouisCaron). +## 0.15 -- (infrastructure) add Travis CI setup. - Thanks Timothée Mazzucotelli (@Pawamoy). +- (fix [#23](https://github.com/tox-dev/detox/issues/23)) do not + swallow exceptions - by @vlaci +- (fix [#16](https://github.com/tox-dev/detox/issues/16)) use tox + quiet level to make detox quiet - by Oliver Bestwalter -- add "-n NUMPROC" option to set number of processes. The default - is the number of CPUs as determined by multiprocessing.cpu_count() - or "2" if the call does not work (e.g. on py27/windows). - Thanks Timothée Mazzucotelli (@Pawamoy). +## 0.14.post3 +- and now the markdown description might even be rendered -0.10.0 ------------------------ +## 0.14.post2 -- get compatible again to tox-2.0 +- *sigh* replace hardcoded long description with actual content of + `README.md` -0.9.4 ------------------------ +## 0.14.post1 -- get compatible again to eventlet by avoiding to import - eventlet.processes, thanks Takeshi Komiya for the PR. +- propagate information about new location of issie tracker to PyPI -- make detox honor skipsdist. Thanks Timoth Messier for the PR. +## 0.14.0 + +- (fix [#15](https://github.com/tox-dev/detox/issues/15)) make detox + aware of new way to fetch a package in tox 3.3 - by Oliver + Bestwalter +- (fix [#15](https://github.com/tox-dev/detox/issues/15)) make detox + aware of new way to fetch a package in tox 3.3 - by Oliver + Bestwalter +- (fix [#25](https://github.com/tox-dev/detox/issues/25)) print out + detox version rather than tox version including detox version as + plugin, when invoking [detox --version]{.title-ref} - by Oliver + Bestwalter + +## 0.13.0 + +- (fix [#283](https://github.com/tox-dev/tox/issues/283)) detox + creates virtualenvs repeatedly and unnecessarily - by Thomas Steinke + +## 0.12.0 + +- (fix [#792](https://github.com/tox-dev/tox/issues/792)) bump tox + version constraint to <4.0 - by Pi Delport +- support and test with Python 2.7, 3.4+ - by Miro Hrončok +- fix project url to point ot github - by Neil Halelamien +- remove some unused imports - by Nir Soffer + +## 0.11.0 + +- #406: Add support for running detox as python -m detox Thanks André + Caron (@AndreLouisCaron). +- (infrastructure) add Travis CI setup. Thanks Timothée Mazzucotelli + (@Pawamoy). +- add "-n NUMPROC" option to set number of processes. The default is + the number of CPUs as determined by multiprocessing.cpu_count() or + "2" if the call does not work (e.g. on py27/windows). Thanks + Timothée Mazzucotelli (@Pawamoy). + +## 0.10.0 -- change license to MIT -0.9.3 ------------------------ +- get compatible again to tox-2.0 + +## 0.9.4 + +- get compatible again to eventlet by avoiding to import + eventlet.processes, thanks Takeshi Komiya for the PR. +- make detox honor skipsdist. Thanks Timoth Messier for the PR. +- change license to MIT -- fix issue6: quickly make detox work with tox-1.6 again (although not all 1.6 features - supported, e.g. --develop does not work) +## 0.9.3 -- fix issue3: don't claim a TROVE identifier of "python3" because detox - itself depends on eventlet which does not work on py3 yet. (Nevertheless - detox will create py3 environments through tox of course) - -- fix issue1: support python2.5 again (although we might drop it in the - future -- it's enough of tox/detox can _create_ and handle py25 environments, - they don't neccessarily need to support running themselv on py25) +- fix issue6: quickly make detox work with tox-1.6 again (although not + all 1.6 features supported, e.g. --develop does not work) +- fix issue3: don't claim a TROVE identifier of "python3" because + detox itself depends on eventlet which does not work on py3 yet. + (Nevertheless detox will create py3 environments through tox of + course) +- fix issue1: support python2.5 again (although we might drop it in + the future -- it's enough of tox/detox can _[create]() and handle + py25 environments, they don't neccessarily need to support running + themselv on py25) -0.9.2 ------------------------ +## 0.9.2 - fix issue4 - fail properly if sdist-packaging fails -0.9.1 ------------------------ +## 0.9.1 - fix issue5 - small adjustments to work with latest tox-1.4.3 version -0.9 ------------------------ +## 0.9 - initial release diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/detox-0.13/PKG-INFO new/detox-0.18/PKG-INFO --- old/detox-0.13/PKG-INFO 2018-08-20 18:49:39.000000000 +0200 +++ new/detox-0.18/PKG-INFO 2018-11-04 18:08:37.000000000 +0100 @@ -1,34 +1,147 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: detox -Version: 0.13 +Version: 0.18 Summary: distributing activities of the tox tool Home-page: https://github.com/tox-dev/detox Author: holger krekel Author-email: holger@merlinux.eu License: MIT -Description: - What is detox? - ========================== - - detox is the distributed version of "tox". It makes efficient use of multiple - CPUs by running all possible activities in parallel. It has the same options - and configuration that tox has so after installation can just run:: +Description: [![Build Status](https://travis-ci.org/tox-dev/detox.svg?branch=master)](https://travis-ci.org/tox-dev/detox) + [![Latest Version on PyPI](https://badge.fury.io/py/detox.svg)](https://badge.fury.io/py/detox) + [![Supported Python Versions](https://img.shields.io/pypi/pyversions/detox.svg)](https://pypi.org/project/detox/) + [![Code Style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) + + # What is detox? + + detox is the distributed version of [tox](https://pypi.org/project/tox/). It makes efficient use of multiple CPUs by running all possible activities in parallel. It has the same options and configuration that tox has so after installation can just run: detox - in the same way and with the same options with which you would run - ``tox``, see the `tox home page`_ for more info. + in the same way and with the same options with which you would run `tox`, see the [tox home page](http://tox.readthedocs.io) for more info. + + Additionally, detox offers a `-n` or `--num` option to set the number of concurrent processes to use. + + **NOTE** due to the concurrent execution of the testenvs the output of the different testruns is not printed to the termineal. Instead they are logged into separate files inside the `log` directories of the testenvs. + + + # CHANGELOG + + ## 0.18 + + Note that usedevlop still does not seem to be fixed (PRs welcome) + + - integrate usable fixes from stale PR7 + - (fix [#20](https://github.com/tox-dev/detox/issues/20) detox + ignores/breaks usedevelop - by Kendall Chuang + - (fix [#21](https://github.com/tox-dev/detox/issues/21) + detox doesn't support skipsdist config option - by Kendall Chuang + - convert changelog to markdown and render as part of description on PyPI + - detox version now prints own version and then what tox has to say + (it's a plugin after all and that should be made clear) + - [Internal changes] + - add extra dependencies in setup.py + - update tests to current pytest API + - use black for code formatting + - use flake8 for linting + - add descriptions to tox envs + - add a "dev" tox env + + ## 0.17 (botched release) + ## 0.16 (not released) + + ## 0.15 + + - (fix [#23](https://github.com/tox-dev/detox/issues/23)) do not + swallow exceptions - by @vlaci + - (fix [#16](https://github.com/tox-dev/detox/issues/16)) use tox + quiet level to make detox quiet - by Oliver Bestwalter + + ## 0.14.post3 + + - and now the markdown description might even be rendered + + ## 0.14.post2 + + - *sigh* replace hardcoded long description with actual content of + `README.md` + + ## 0.14.post1 + + - propagate information about new location of issie tracker to PyPI + + ## 0.14.0 + + - (fix [#15](https://github.com/tox-dev/detox/issues/15)) make detox + aware of new way to fetch a package in tox 3.3 - by Oliver + Bestwalter + - (fix [#15](https://github.com/tox-dev/detox/issues/15)) make detox + aware of new way to fetch a package in tox 3.3 - by Oliver + Bestwalter + - (fix [#25](https://github.com/tox-dev/detox/issues/25)) print out + detox version rather than tox version including detox version as + plugin, when invoking [detox --version]{.title-ref} - by Oliver + Bestwalter + + ## 0.13.0 + + - (fix [#283](https://github.com/tox-dev/tox/issues/283)) detox + creates virtualenvs repeatedly and unnecessarily - by Thomas Steinke + + ## 0.12.0 + + - (fix [#792](https://github.com/tox-dev/tox/issues/792)) bump tox + version constraint to <4.0 - by Pi Delport + - support and test with Python 2.7, 3.4+ - by Miro Hrončok + - fix project url to point ot github - by Neil Halelamien + - remove some unused imports - by Nir Soffer + + ## 0.11.0 + + - #406: Add support for running detox as python -m detox Thanks André + Caron (@AndreLouisCaron). + - (infrastructure) add Travis CI setup. Thanks Timothée Mazzucotelli + (@Pawamoy). + - add "-n NUMPROC" option to set number of processes. The default is + the number of CPUs as determined by multiprocessing.cpu_count() or + "2" if the call does not work (e.g. on py27/windows). Thanks + Timothée Mazzucotelli (@Pawamoy). + + ## 0.10.0 + + + - get compatible again to tox-2.0 + + ## 0.9.4 + + - get compatible again to eventlet by avoiding to import + eventlet.processes, thanks Takeshi Komiya for the PR. + - make detox honor skipsdist. Thanks Timoth Messier for the PR. + - change license to MIT + + ## 0.9.3 + + - fix issue6: quickly make detox work with tox-1.6 again (although not + all 1.6 features supported, e.g. --develop does not work) + - fix issue3: don't claim a TROVE identifier of "python3" because + detox itself depends on eventlet which does not work on py3 yet. + (Nevertheless detox will create py3 environments through tox of + course) + - fix issue1: support python2.5 again (although we might drop it in + the future -- it's enough of tox/detox can _[create]() and handle + py25 environments, they don't neccessarily need to support running + themselv on py25) + + ## 0.9.2 - Please file issues as "tox" issues using the "detox" label: + - fix issue4 - fail properly if sdist-packaging fails - https://github.com/tox-dev/tox/issues + ## 0.9.1 - .. note:: + - fix issue5 - small adjustments to work with latest tox-1.4.3 version - detox runs on python2.7 and python3.4+ (but supports creation of - all environments supported of the underlying "tox" command) + ## 0.9 - .. _`tox home page`: http://tox.readthedocs.org + - initial release Platform: unix Platform: linux @@ -51,3 +164,6 @@ Classifier: Topic :: Software Development :: Libraries Classifier: Topic :: Utilities Classifier: Programming Language :: Python +Description-Content-Type: text/markdown +Provides-Extra: lint +Provides-Extra: dev diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/detox-0.13/README.md new/detox-0.18/README.md --- old/detox-0.13/README.md 2018-04-14 14:47:13.000000000 +0200 +++ new/detox-0.18/README.md 2018-09-23 16:26:44.000000000 +0200 @@ -1,4 +1,7 @@ [![Build Status](https://travis-ci.org/tox-dev/detox.svg?branch=master)](https://travis-ci.org/tox-dev/detox) +[![Latest Version on PyPI](https://badge.fury.io/py/detox.svg)](https://badge.fury.io/py/detox) +[![Supported Python Versions](https://img.shields.io/pypi/pyversions/detox.svg)](https://pypi.org/project/detox/) +[![Code Style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) # What is detox? @@ -10,8 +13,4 @@ Additionally, detox offers a `-n` or `--num` option to set the number of concurrent processes to use. -Please file issues as ["tox" issues](https://github.com/tox-dev/tox/issues) using a "detox: " prefix in the issue title. - -## Note - -detox runs on python2.7 and python3.4+ (but supports creation of all environments supported of the underlying "tox" command) +**NOTE** due to the concurrent execution of the testenvs the output of the different testruns is not printed to the termineal. Instead they are logged into separate files inside the `log` directories of the testenvs. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/detox-0.13/detox/__init__.py new/detox-0.18/detox/__init__.py --- old/detox-0.13/detox/__init__.py 2018-04-20 12:17:11.000000000 +0200 +++ new/detox-0.18/detox/__init__.py 2018-11-04 18:08:01.000000000 +0100 @@ -1 +1 @@ -__version__ = '0.12' +__version__ = "0.18" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/detox-0.13/detox/__main__.py new/detox-0.18/detox/__main__.py --- old/detox-0.13/detox/__main__.py 2018-04-11 13:12:37.000000000 +0200 +++ new/detox-0.18/detox/__main__.py 2018-09-23 16:42:06.000000000 +0200 @@ -1,5 +1,7 @@ -from detox.main import main +import sys + +from detox.cli import main # Enable ``python -m detox ...``. -if __name__ == '__main__': - main() +if __name__ == "__main__": + sys.exit(main()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/detox-0.13/detox/cli.py new/detox-0.18/detox/cli.py --- old/detox-0.13/detox/cli.py 1970-01-01 01:00:00.000000000 +0100 +++ new/detox-0.18/detox/cli.py 2018-11-04 17:24:55.000000000 +0100 @@ -0,0 +1,20 @@ +from __future__ import print_function + +import sys + +from tox.session import prepare as tox_prepare + +from detox import __version__ +from detox.proc import Detox + + +def main(args=None): + args = sys.argv[1:] if args is None else args + if args and args[0] == "--version": + print("detox {} running as plugin in tox:".format(__version__)) + # fall through to let tox add its own version info ... + config = tox_prepare(args) + detox = Detox(config) + if not hasattr(config.option, "quiet_level") or not config.option.quiet_level: + detox.startloopreport() + return detox.runtestsmulti(detox.toxsession.evaluated_env_list()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/detox-0.13/detox/main.py new/detox-0.18/detox/main.py --- old/detox-0.13/detox/main.py 2018-08-20 17:51:42.000000000 +0200 +++ new/detox-0.18/detox/main.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,23 +0,0 @@ -import sys -import py -import detox -from detox.proc import Detox - -def parse(args): - from tox.session import prepare - return prepare(args) - -def main(args=None): - if args is None: - args = sys.argv[1:] - config = parse(args) - #now = py.std.time.time() - detox = Detox(config) - detox.startloopreport() - retcode = detox.runtestsmulti(config.envlist) - #elapsed = py.std.time.time() - now - #cumulated = detox.toxsession.report.cumulated_time - #detox.toxsession.report.line( - # "detox speed-up: %.2f (elapsed %.2f, cumulated %.2f)" % ( - # cumulated / elapsed, elapsed, cumulated), bold=True) - raise SystemExit(retcode) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/detox-0.13/detox/proc.py new/detox-0.18/detox/proc.py --- old/detox-0.13/detox/proc.py 2018-08-20 17:51:42.000000000 +0200 +++ new/detox-0.18/detox/proc.py 2018-11-04 17:25:50.000000000 +0100 @@ -2,18 +2,22 @@ import eventlet from eventlet.timeout import Timeout -from eventlet.green.subprocess import Popen, PIPE, STDOUT +from eventlet.green.subprocess import Popen from eventlet import GreenPool +import tox import tox.session + def timelimited(secs, func): if secs is not None: with Timeout(secs): return func() return func() + class FileSpinner: chars = r"- \ | / - \ | /".split() + def __init__(self): self.path2last = {} @@ -22,7 +26,7 @@ lastsize, charindex = self.path2last[path] except KeyError: lastsize, charindex = 0, 0 - newsize = path.size() + newsize = 0 if not path else path.size() if newsize != lastsize: charindex += 1 self.path2last[path] = (lastsize, charindex) @@ -30,8 +34,10 @@ class ToxReporter(tox.session.Reporter): - sortorder = ("runtests command installdeps installpkg inst inst-nodeps " - "sdist-make create recreate".split()) + sortorder = ( + "runtests command installdeps installpkg inst inst-nodeps " + "sdist-make create recreate".split() + ) def __init__(self, session): super(ToxReporter, self).__init__(session) @@ -46,8 +52,8 @@ for action in self.session._actions: for popen in action._popenlist: if popen.poll() is None: - l = ac2popenlist.setdefault(action.activity, []) - l.append(popen) + ol = ac2popenlist.setdefault(action.activity, []) + ol.append(popen) if not action._popenlist and action in self._actionmayfinish: super(ToxReporter, self).logaction_finish(action) self._actionmayfinish.remove(action) @@ -59,7 +65,7 @@ continue sublist = [] for popen in popenlist: - name = getattr(popen.action.venv, 'name', "INLINE") + name = getattr(popen.action.venv, "name", "INLINE") char = filespinner.getchar(popen.outpath) sublist.append("%s%s" % (name, char)) msg.append("%s %s" % (acname, " ".join(sublist))) @@ -67,7 +73,7 @@ if msg: msg = " ".join(msg) if len(msg) >= self.tw.fullwidth: - msg = msg[:self.tw.fullwidth-3]+".." + msg = msg[: self.tw.fullwidth - 3] + ".." self.tw.reline(msg) def __getattr__(self, name): @@ -75,9 +81,10 @@ raise AttributeError(name) def generic_report(*args): - self._calls.append((name,)+args) + self._calls.append((name,) + args) if self.config.option.verbosity >= 2: - print ("%s" %(self._calls[-1], )) + print("%s" % (self._calls[-1],)) + return generic_report def logaction_finish(self, action): @@ -87,17 +94,13 @@ else: super(ToxReporter, self).logaction_finish(action) - #def logpopen(self, popen): - # self._tw.line(msg) - - #def popen_error(self, msg, popen): - # self._tw.line(msg, red=True) - # self._tw.line("logfile: %s" % popen.stdout.name) class Detox: def __init__(self, toxconfig): self._toxconfig = toxconfig self._resources = Resources(self) + self._sdistpath = None + self._toxsession = None def startloopreport(self): if self.toxsession.report.tw.hasmarkup: @@ -105,15 +108,19 @@ @property def toxsession(self): - try: - return self._toxsession - except AttributeError: + if not self._toxsession: self._toxsession = tox.session.Session( - self._toxconfig, Report=ToxReporter, popen=Popen) - return self._toxsession + self._toxconfig, Report=ToxReporter, popen=Popen + ) + return self._toxsession def provide_sdist(self): - sdistpath = self.toxsession.get_installpkg_path() + try: + sdistpath = self.toxsession.get_installpkg_path() # tox < 3.3 + except AttributeError: + from tox.package import get_package + + sdistpath = get_package(self.toxsession) if not sdistpath: raise SystemExit(1) return sdistpath @@ -127,6 +134,10 @@ venv = self.toxsession.getvenv(venvname) return self.toxsession.installpkg(venv, sdistpath) + def provide_developpkg(self, venvname): + venv = self.toxsession.getvenv(venvname) + return self.toxsession.developpkg(venv, self.toxsession.config.setupdir) + def runtests(self, venvname): if self.toxsession.config.option.sdistonly: self._sdistpath = self.getresources("sdist") @@ -138,16 +149,22 @@ self.toxsession.runtestenv(venv, redirect=True) else: venv, sdist = self.getresources("venv:%s" % venvname, "sdist") - self._sdistpath = sdist if venv and sdist: + # tox >= 3.5 returns a tuple, the first one is the session package + if isinstance(sdist, tuple): + sdist = sdist[0] if self.toxsession.installpkg(venv, sdist): self.toxsession.runtestenv(venv, redirect=True) def runtestsmulti(self, envlist): pool = GreenPool(size=self._toxconfig.option.numproc) + threads = [] for env in envlist: - pool.spawn_n(self.runtests, env) - pool.waitall() + threads.append(pool.spawn(self.runtests, env)) + + for t in threads: + # re-raises any exceptions of the worker thread + t.wait() if not self.toxsession.config.option.sdistonly: retcode = self._toxsession._summary() return retcode @@ -155,6 +172,7 @@ def getresources(self, *specs): return self._resources.getresources(*specs) + class Resources: def __init__(self, providerbase): self._providerbase = providerbase @@ -175,9 +193,9 @@ if spec not in self._spec2thread: t = self._pool.spawn(self._dispatchprovider, spec) self._spec2thread[spec] = t - l = [] + resources = [] for spec in specs: if spec not in self._resources: self._spec2thread[spec].wait() - l.append(self._resources[spec]) - return l + resources.append(self._resources[spec]) + return resources diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/detox-0.13/detox/tox_proclimit.py new/detox-0.18/detox/tox_proclimit.py --- old/detox-0.13/detox/tox_proclimit.py 2018-04-16 13:10:08.000000000 +0200 +++ new/detox-0.18/detox/tox_proclimit.py 2018-09-22 14:49:14.000000000 +0200 @@ -9,8 +9,7 @@ def positive_integer(value): ivalue = int(value) if ivalue <= 0: - raise argparse.ArgumentTypeError( - "%s is an invalid positive int value" % value) + raise argparse.ArgumentTypeError("{} must be greater 0".format(value)) return ivalue try: @@ -18,10 +17,11 @@ except Exception: num_proc = 2 parser.add_argument( - "-n", "--num", + "-n", + "--num", type=positive_integer, action="store", default=num_proc, dest="numproc", - help="set the number of concurrent processes " - "(default %s)." % num_proc) + help="set the number of concurrent processes " "(default {}).".format(num_proc), + ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/detox-0.13/detox.egg-info/PKG-INFO new/detox-0.18/detox.egg-info/PKG-INFO --- old/detox-0.13/detox.egg-info/PKG-INFO 2018-08-20 18:49:39.000000000 +0200 +++ new/detox-0.18/detox.egg-info/PKG-INFO 2018-11-04 18:08:37.000000000 +0100 @@ -1,34 +1,147 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: detox -Version: 0.13 +Version: 0.18 Summary: distributing activities of the tox tool Home-page: https://github.com/tox-dev/detox Author: holger krekel Author-email: holger@merlinux.eu License: MIT -Description: - What is detox? - ========================== - - detox is the distributed version of "tox". It makes efficient use of multiple - CPUs by running all possible activities in parallel. It has the same options - and configuration that tox has so after installation can just run:: +Description: [![Build Status](https://travis-ci.org/tox-dev/detox.svg?branch=master)](https://travis-ci.org/tox-dev/detox) + [![Latest Version on PyPI](https://badge.fury.io/py/detox.svg)](https://badge.fury.io/py/detox) + [![Supported Python Versions](https://img.shields.io/pypi/pyversions/detox.svg)](https://pypi.org/project/detox/) + [![Code Style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) + + # What is detox? + + detox is the distributed version of [tox](https://pypi.org/project/tox/). It makes efficient use of multiple CPUs by running all possible activities in parallel. It has the same options and configuration that tox has so after installation can just run: detox - in the same way and with the same options with which you would run - ``tox``, see the `tox home page`_ for more info. + in the same way and with the same options with which you would run `tox`, see the [tox home page](http://tox.readthedocs.io) for more info. + + Additionally, detox offers a `-n` or `--num` option to set the number of concurrent processes to use. + + **NOTE** due to the concurrent execution of the testenvs the output of the different testruns is not printed to the termineal. Instead they are logged into separate files inside the `log` directories of the testenvs. + + + # CHANGELOG + + ## 0.18 + + Note that usedevlop still does not seem to be fixed (PRs welcome) + + - integrate usable fixes from stale PR7 + - (fix [#20](https://github.com/tox-dev/detox/issues/20) detox + ignores/breaks usedevelop - by Kendall Chuang + - (fix [#21](https://github.com/tox-dev/detox/issues/21) + detox doesn't support skipsdist config option - by Kendall Chuang + - convert changelog to markdown and render as part of description on PyPI + - detox version now prints own version and then what tox has to say + (it's a plugin after all and that should be made clear) + - [Internal changes] + - add extra dependencies in setup.py + - update tests to current pytest API + - use black for code formatting + - use flake8 for linting + - add descriptions to tox envs + - add a "dev" tox env + + ## 0.17 (botched release) + ## 0.16 (not released) + + ## 0.15 + + - (fix [#23](https://github.com/tox-dev/detox/issues/23)) do not + swallow exceptions - by @vlaci + - (fix [#16](https://github.com/tox-dev/detox/issues/16)) use tox + quiet level to make detox quiet - by Oliver Bestwalter + + ## 0.14.post3 + + - and now the markdown description might even be rendered + + ## 0.14.post2 + + - *sigh* replace hardcoded long description with actual content of + `README.md` + + ## 0.14.post1 + + - propagate information about new location of issie tracker to PyPI + + ## 0.14.0 + + - (fix [#15](https://github.com/tox-dev/detox/issues/15)) make detox + aware of new way to fetch a package in tox 3.3 - by Oliver + Bestwalter + - (fix [#15](https://github.com/tox-dev/detox/issues/15)) make detox + aware of new way to fetch a package in tox 3.3 - by Oliver + Bestwalter + - (fix [#25](https://github.com/tox-dev/detox/issues/25)) print out + detox version rather than tox version including detox version as + plugin, when invoking [detox --version]{.title-ref} - by Oliver + Bestwalter + + ## 0.13.0 + + - (fix [#283](https://github.com/tox-dev/tox/issues/283)) detox + creates virtualenvs repeatedly and unnecessarily - by Thomas Steinke + + ## 0.12.0 + + - (fix [#792](https://github.com/tox-dev/tox/issues/792)) bump tox + version constraint to <4.0 - by Pi Delport + - support and test with Python 2.7, 3.4+ - by Miro Hrončok + - fix project url to point ot github - by Neil Halelamien + - remove some unused imports - by Nir Soffer + + ## 0.11.0 + + - #406: Add support for running detox as python -m detox Thanks André + Caron (@AndreLouisCaron). + - (infrastructure) add Travis CI setup. Thanks Timothée Mazzucotelli + (@Pawamoy). + - add "-n NUMPROC" option to set number of processes. The default is + the number of CPUs as determined by multiprocessing.cpu_count() or + "2" if the call does not work (e.g. on py27/windows). Thanks + Timothée Mazzucotelli (@Pawamoy). + + ## 0.10.0 + + + - get compatible again to tox-2.0 + + ## 0.9.4 + + - get compatible again to eventlet by avoiding to import + eventlet.processes, thanks Takeshi Komiya for the PR. + - make detox honor skipsdist. Thanks Timoth Messier for the PR. + - change license to MIT + + ## 0.9.3 + + - fix issue6: quickly make detox work with tox-1.6 again (although not + all 1.6 features supported, e.g. --develop does not work) + - fix issue3: don't claim a TROVE identifier of "python3" because + detox itself depends on eventlet which does not work on py3 yet. + (Nevertheless detox will create py3 environments through tox of + course) + - fix issue1: support python2.5 again (although we might drop it in + the future -- it's enough of tox/detox can _[create]() and handle + py25 environments, they don't neccessarily need to support running + themselv on py25) + + ## 0.9.2 - Please file issues as "tox" issues using the "detox" label: + - fix issue4 - fail properly if sdist-packaging fails - https://github.com/tox-dev/tox/issues + ## 0.9.1 - .. note:: + - fix issue5 - small adjustments to work with latest tox-1.4.3 version - detox runs on python2.7 and python3.4+ (but supports creation of - all environments supported of the underlying "tox" command) + ## 0.9 - .. _`tox home page`: http://tox.readthedocs.org + - initial release Platform: unix Platform: linux @@ -51,3 +164,6 @@ Classifier: Topic :: Software Development :: Libraries Classifier: Topic :: Utilities Classifier: Programming Language :: Python +Description-Content-Type: text/markdown +Provides-Extra: lint +Provides-Extra: dev diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/detox-0.13/detox.egg-info/SOURCES.txt new/detox-0.18/detox.egg-info/SOURCES.txt --- old/detox-0.13/detox.egg-info/SOURCES.txt 2018-08-20 18:49:39.000000000 +0200 +++ new/detox-0.18/detox.egg-info/SOURCES.txt 2018-11-04 18:08:37.000000000 +0100 @@ -7,7 +7,7 @@ tox.ini detox/__init__.py detox/__main__.py -detox/main.py +detox/cli.py detox/proc.py detox/tox_proclimit.py detox.egg-info/PKG-INFO diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/detox-0.13/detox.egg-info/entry_points.txt new/detox-0.18/detox.egg-info/entry_points.txt --- old/detox-0.13/detox.egg-info/entry_points.txt 2018-08-20 18:49:39.000000000 +0200 +++ new/detox-0.18/detox.egg-info/entry_points.txt 2018-11-04 18:08:37.000000000 +0100 @@ -1,5 +1,5 @@ [console_scripts] -detox=detox.main:main +detox=detox.cli:main [tox] proclimit = detox.tox_proclimit diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/detox-0.13/detox.egg-info/requires.txt new/detox-0.18/detox.egg-info/requires.txt --- old/detox-0.13/detox.egg-info/requires.txt 2018-08-20 18:49:39.000000000 +0200 +++ new/detox-0.18/detox.egg-info/requires.txt 2018-11-04 18:08:37.000000000 +0100 @@ -1,3 +1,10 @@ -tox<4,>=2 +tox<4,>=3.5 py>=1.4.27 eventlet>=0.15.0 + +[dev] +pytest>=3.8 + +[lint] +black +flake8 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/detox-0.13/setup.py new/detox-0.18/setup.py --- old/detox-0.13/setup.py 2018-08-20 18:47:59.000000000 +0200 +++ new/detox-0.18/setup.py 2018-11-04 18:08:01.000000000 +0100 @@ -1,65 +1,48 @@ from setuptools import setup -long_description = """ -What is detox? -========================== -detox is the distributed version of "tox". It makes efficient use of multiple -CPUs by running all possible activities in parallel. It has the same options -and configuration that tox has so after installation can just run:: - - detox - -in the same way and with the same options with which you would run -``tox``, see the `tox home page`_ for more info. - -Please file issues as "tox" issues using the "detox" label: - - https://github.com/tox-dev/tox/issues - -.. note:: - - detox runs on python2.7 and python3.4+ (but supports creation of - all environments supported of the underlying "tox" command) - -.. _`tox home page`: http://tox.readthedocs.org -""" - - -def main(): - setup( - name='detox', - description='distributing activities of the tox tool', - long_description=long_description, - version='0.13', - url='https://github.com/tox-dev/detox', - license='MIT', - platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], - author='holger krekel', - author_email='holger@merlinux.eu', - classifiers=['Development Status :: 4 - Beta', - 'Framework :: tox', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: MIT License', - 'Operating System :: POSIX', - 'Operating System :: Microsoft :: Windows', - 'Operating System :: MacOS :: MacOS X', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Topic :: Software Development :: Testing', - 'Topic :: Software Development :: Libraries', - 'Topic :: Utilities', - 'Programming Language :: Python', - ], - packages=['detox', ], - install_requires=['tox>=2,<4', 'py>=1.4.27', 'eventlet>=0.15.0'], - entry_points={'console_scripts': 'detox=detox.main:main', - 'tox': ['proclimit = detox.tox_proclimit']}, - ) - - -if __name__ == '__main__': - main() +def make_long_description(): + with open("README.md") as f: + readme = f.read() + with open("CHANGELOG") as f: + changelog = f.read() + return readme + "\n\n" + changelog + + +setup( + name="detox", + description="distributing activities of the tox tool", + long_description=make_long_description(), + long_description_content_type="text/markdown", + version="0.18", # Note: keep in sync with detox/__init__.py + url="https://github.com/tox-dev/detox", + license="MIT", + platforms=["unix", "linux", "osx", "cygwin", "win32"], + author="holger krekel", + author_email="holger@merlinux.eu", + classifiers=[ + "Development Status :: 4 - Beta", + "Framework :: tox", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: POSIX", + "Operating System :: Microsoft :: Windows", + "Operating System :: MacOS :: MacOS X", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Topic :: Software Development :: Testing", + "Topic :: Software Development :: Libraries", + "Topic :: Utilities", + "Programming Language :: Python", + ], + packages=["detox"], + install_requires=["tox>=3.5,<4", "py>=1.4.27", "eventlet>=0.15.0"], + extras_require={"lint": ["black", "flake8"], "dev": ["pytest >= 3.8"]}, + entry_points={ + "console_scripts": "detox=detox.cli:main", + "tox": ["proclimit = detox.tox_proclimit"], + }, +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/detox-0.13/tests/conftest.py new/detox-0.18/tests/conftest.py --- old/detox-0.13/tests/conftest.py 2018-08-20 18:32:26.000000000 +0200 +++ new/detox-0.18/tests/conftest.py 2018-09-23 16:41:42.000000000 +0200 @@ -1,21 +1,24 @@ -from __future__ import with_statement -import pytest -import py -import time +from __future__ import with_statement, print_function + import sys +import time + import eventlet -import detox -from py.builtin import print_ +import py +import pytest from eventlet.green.subprocess import Popen from textwrap import dedent as d + from detox.proc import Detox -from _pytest.pytester import RunResult, getdecoded -import detox.main +from detox.cli import main as detox_main, tox_prepare pytest_plugins = "pytester" + def create_example1(tmpdir): - tmpdir.join("setup.py").write(d(""" + tmpdir.join("setup.py").write( + d( + """ from setuptools import setup def main(): @@ -27,25 +30,37 @@ ) if __name__ == '__main__': main() - """)) - tmpdir.join("tox.ini").write(d(""" + """ + ) + ) + tmpdir.join("tox.ini").write( + d( + """ [testenv:py] - """)) + """ + ) + ) tmpdir.join("example1", "__init__.py").ensure() def create_example2(tmpdir): - tmpdir.join("tox.ini").write(d(""" + tmpdir.join("tox.ini").write( + d( + """ [tox] skipsdist = True [testenv:py] - """)) + """ + ) + ) tmpdir.join("example2", "__init__.py").ensure() def create_example3(tmpdir): - tmpdir.join("tox.ini").write(d(""" + tmpdir.join("tox.ini").write( + d( + """ [tox] skipsdist = True @@ -54,41 +69,49 @@ [testenv:py1] [testenv:py2] - """)) + """ + ) + ) tmpdir.join("example3", "__init__.py").ensure() def pytest_configure(config): config.addinivalue_line("markers", "example1: use example1 for setup") config.addinivalue_line("markers", "example2: use example2 for setup") - config.addinivalue_line("markers", "timeout(N): stop test function " - "after N seconds, throwing a Timeout.") + config.addinivalue_line( + "markers", + "timeout(N): stop test function " "after N seconds, throwing a Timeout.", + ) -def pytest_funcarg__exampledir(request): - tmpdir = request.getfuncargvalue("tmpdir") + +@pytest.fixture +def exampledir(request, tmpdir): for x in dir(request.function): if x.startswith("example"): exampledir = tmpdir.mkdir(x) - globals()["create_"+x](exampledir) - print ("%s created at %s" %(x,exampledir)) + globals()["create_" + x](exampledir) + print("%s created at %s" % (x, exampledir)) break else: raise request.LookupError("test function has example") return exampledir -def pytest_funcarg__detox(request): - exampledir = request.getfuncargvalue("exampledir") + +@pytest.fixture +def detox(exampledir): old = exampledir.chdir() try: - return Detox(detox.main.parse([])) + return Detox(tox_prepare([])) finally: old.chdir() -def pytest_funcarg__cmd(request): - exampledir = request.getfuncargvalue("exampledir") + +@pytest.fixture +def cmd(request, exampledir): cmd = Cmd(exampledir, request) return cmd + class Cmd: def __init__(self, basedir, request): self.basedir = basedir @@ -97,24 +120,27 @@ def main(self, *args): self.basedir.chdir() - return detox.main.main(args) + return detox_main(args) def rundetox(self, *args): - old = self.basedir.chdir() + self.basedir.chdir() script = py.path.local.sysfind("detox") assert script, "could not find 'detox' script" return self._run(script, *args) def _run(self, *cmdargs): + from _pytest.pytester import RunResult, getdecoded + cmdargs = [str(x) for x in cmdargs] p1 = self.tmpdir.join("stdout") p2 = self.tmpdir.join("stderr") - print_("running", cmdargs, "curdir=", py.path.local()) + print("running", cmdargs, "curdir=", py.path.local()) f1 = p1.open("wb") f2 = p2.open("wb") now = time.time() - popen = Popen(cmdargs, stdout=f1, stderr=f2, - close_fds=(sys.platform != "win32")) + popen = Popen( + cmdargs, stdout=f1, stderr=f2, close_fds=(sys.platform != "win32") + ) ret = popen.wait() f1.close() f2.close() @@ -122,46 +148,39 @@ out = getdecoded(out).splitlines() err = p2.read("rb") err = getdecoded(err).splitlines() + def dump_lines(lines, fp): try: for line in lines: - py.builtin.print_(line, file=fp) + print(line, file=fp) except UnicodeEncodeError: print("couldn't print to %s because of encoding" % (fp,)) + dump_lines(out, sys.stdout) dump_lines(err, sys.stderr) - return RunResult(ret, out, err, time.time()-now) + return RunResult(ret, out, err, time.time() - now) -@pytest.mark.tryfirst -def pytest_pyfunc_call(__multicall__, pyfuncitem): - try: - timeout = pyfuncitem.obj.timeout.args[0] - except (AttributeError, IndexError): - timeout = 5.0 + +@pytest.fixture(autouse=True) +def with_timeout(request): + marker = request.node.get_closest_marker("timeout") + timeout = marker.args[0] if marker else 5.0 with eventlet.Timeout(timeout): - return __multicall__.execute() + yield -def test_pyfuncall(): - class MC: - def execute(self): - eventlet.sleep(5.0) - class pyfuncitem: - class obj: - class timeout: - args = [0.001] - pytest.raises(eventlet.Timeout, - lambda: pytest_pyfunc_call(MC(), pyfuncitem)) def test_hang(testdir): - p = py.path.local(__file__).dirpath('conftest.py') + p = py.path.local(__file__).dirpath("conftest.py") p.copy(testdir.tmpdir.join(p.basename)) - t = testdir.makepyfile(""" + testdir.makepyfile( + """ import pytest from eventlet.green import time @pytest.mark.timeout(0.01) def test_hang(): time.sleep(3.0) - """) + """ + ) result = testdir.runpytest() assert "failed to timeout" not in result.stdout.str() result.stdout.fnmatch_lines(["*Timeout: 0.01*"]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/detox-0.13/tests/test_detox.py new/detox-0.18/tests/test_detox.py --- old/detox-0.13/tests/test_detox.py 2018-04-11 13:12:37.000000000 +0200 +++ new/detox-0.18/tests/test_detox.py 2018-11-04 17:24:55.000000000 +0100 @@ -2,67 +2,76 @@ import pytest import eventlet -import detox + from detox.proc import Resources + class TestResources: def test_getresources(self): - l= [] + x = [] + class Provider: def provide_abc(self): - l.append(1) + x.append(1) return 42 + resources = Resources(Provider()) res, = resources.getresources("abc") assert res == 42 - assert len(l) == 1 + assert len(x) == 1 res, = resources.getresources("abc") - assert len(l) == 1 + assert len(x) == 1 assert res == 42 def test_getresources_param(self): class Provider: def provide_abc(self, param): return param + resources = Resources(Provider()) res, = resources.getresources("abc:123") return res == "123" def test_getresources_parallel(self): - l= [] - queue = eventlet.Queue() + x = [] + class Provider: def provide_abc(self): - l.append(1) + x.append(1) return 42 + resources = Resources(Provider()) pool = eventlet.GreenPool(2) pool.spawn(lambda: resources.getresources("abc")) pool.spawn(lambda: resources.getresources("abc")) pool.waitall() - assert len(l) == 1 + assert len(x) == 1 def test_getresources_multi(self): - l= [] - queue = eventlet.Queue() + x = [] + class Provider: def provide_abc(self): - l.append(1) + x.append(1) return 42 + def provide_def(self): - l.append(1) + x.append(1) return 23 + resources = Resources(Provider()) a, d = resources.getresources("abc", "def") assert a == 42 assert d == 23 + class TestDetoxExample1: pytestmark = [pytest.mark.example1, pytest.mark.timeout(20)] def test_createsdist(self, detox): - sdist, = detox.getresources("sdist") - assert sdist.check() + sdists, = detox.getresources("sdist") + for sdist in sdists: + assert sdist.check() def test_getvenv(self, detox): venv, = detox.getresources("venv:py") @@ -73,21 +82,26 @@ def test_test(self, detox): detox.runtests("py") + class TestDetoxExample2: pytestmark = [pytest.mark.example2, pytest.mark.timeout(20)] def test_test(self, detox): detox.runtests("py") + def test_developpkg(self, detox): + detox.getresources("venv:py") + developpkg, = detox.getresources("developpkg:py") + assert developpkg is False + + class TestCmdline: pytestmark = [pytest.mark.example1] + @pytest.mark.timeout(20) def test_runtests(self, cmd): result = cmd.rundetox("-e", "py", "-v", "-v") - result.stdout.fnmatch_lines([ - "py*getenv*", - "py*create:*", - ]) + result.stdout.fnmatch_lines(["py*getenv*", "py*create:*"]) class TestProcLimitOption: @@ -97,25 +111,27 @@ class MyConfig: class MyOption: numproc = 7 + option = MyOption() - l = [] + x = [] def MyGreenPool(**kw): - l.append(kw) + x.append(kw) # Building a Detox object will already call GreenPool(), # so we have to let MyGreenPool being called twice before raise - if len(l) == 2: + if len(x) == 2: raise ValueError from detox import proc - setattr(proc, 'GreenPool', MyGreenPool) + + setattr(proc, "GreenPool", MyGreenPool) with pytest.raises(ValueError): d = proc.Detox(MyConfig()) - d.runtestsmulti(['env1', 'env2', 'env3']) # Fake env list + d.runtestsmulti(["env1", "env2", "env3"]) # Fake env list - assert l[0] == {} # When building Detox object - assert l[1] == {'size': 7} # When calling runtestsmulti + assert x[0] == {} # When building Detox object + assert x[1] == {"size": 7} # When calling runtestsmulti @pytest.mark.timeout(60) def test_runtests(self, cmd): @@ -131,4 +147,4 @@ delta2 = then2 - now2 assert delta2 >= timedelta(seconds=1) - assert delta1 >= delta2, 'pool size=2 took much time than pool size=1' + assert delta1 >= delta2, "pool size=2 took much time than pool size=1" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/detox-0.13/tests/test_main.py new/detox-0.18/tests/test_main.py --- old/detox-0.13/tests/test_main.py 2018-04-11 13:12:37.000000000 +0200 +++ new/detox-0.18/tests/test_main.py 2018-09-23 15:16:00.000000000 +0200 @@ -12,22 +12,17 @@ except subprocess.CalledProcessError as error: output = error.output status = error.returncode - output = output.decode('utf-8') + output = output.decode("utf-8") if status not in success_codes: raise Exception( - 'Command %r return exit code %d and output: """%s""".' % ( - command, - status, - output, - ) + 'Command %r return exit code %d and output: """%s""".' + % (command, status, output) ) return status, output def test_run_as_module(): """Can be run as `python -m detox ...`.""" - status, output = invoke([ - sys.executable, '-m', 'detox', '--help', - ]) + status, output = invoke([sys.executable, "-m", "detox", "--help"]) assert status == 0 - assert output.startswith('usage:') + assert output.startswith("usage:") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/detox-0.13/tox.ini new/detox-0.18/tox.ini --- old/detox-0.13/tox.ini 2018-04-20 15:51:25.000000000 +0200 +++ new/detox-0.18/tox.ini 2018-09-25 19:54:23.000000000 +0200 @@ -1,8 +1,31 @@ [tox] -envlist = py27,py34,py35,py36,py37 +minversion = 3.0 +envlist = py27,py34,py35,py36,py37,lint + +[flake8] +max-line-length = 89 + +[testenv:lint] +extras = lint +commands = + black -v . + flake8 [testenv] +description = test project with {basepython} +extras = dev +commands = pytest {posargs} + +[testenv:tox-master] deps = - pytest - tox -commands = pytest --junitxml={envlogdir}/junit-{envname}.xml {posargs} + -e git://github.com/tox-dev/tox#egg=tox + +[testenv:dev] +description = create a development environment with all necessities +extras = + lint + dev +usedevelop = True +commands = + python --version + detox {posargs:--version}