Tox 总是需要 30 秒才能 运行
Tox takes always 30 seconds to run
Tox 几周前 运行ning 还不错,但我回到了一个使用 tox 进行 运行 测试的项目,现在它总是需要 30 秒才能 运行。我认为这可能是对项目所做更改的问题,但我在其他项目中尝试过 tox(甚至是 hello world 测试),它们都需要 30 秒才能 运行。
$ time tox
GLOB sdist-make: /private/tmp/dependency_manager/setup.py
py27 inst-nodeps: /private/tmp/dependency_manager/.tox/dist/dependencyManager-1.3.6.zip
py27 installed: boto==2.41.0,boto3==1.3.1,botocore==1.4.33,dependencyManager==1.3.6,docutils==0.12,funcsigs==1.0.2,futures==3.0.5,jmespath==0.9.0,mock==2.0.0,nose2==0.6.5,pbr==1.10.0,python-dateutil==2.5.3,six==1.10.0,troposphere==1.6.0
py27 runtests: PYTHONHASHSEED='3107006541'
py27 runtests: commands[0] | nose2
/private/tmp/dependency_manager/.tox/py27/lib/python2.7/site-packages/troposphere/dynamodb.py:10: UserWarning: This module is outdated and will be replaced with troposphere.dynamodb2. Please see the README for instructions on how to prepare for this change.
warnings.warn("This module is outdated and will be replaced with "
.....................
----------------------------------------------------------------------
Ran 21 tests in 0.020s
OK
_____________________________________________________________________________________________ summary ______________________________________________________________________________________________
py27: commands succeeded
congratulations :)
tox 1,67s user 0,43s system 6% cpu 32,192 total
现在是一个完全不同的项目。
$ time tox
py27 recreate: /Users/jose.armesto/dev/dredd/.tox/py27
py27 installdeps: nose, mock, coverage >= 3.3
py27 installed: coverage==4.1,funcsigs==1.0.2,mock==2.0.0,nose==1.3.7,pbr==1.10.0,six==1.10.0
py27 runtests: PYTHONHASHSEED='1261821084'
py27 runtests: commands[0] | nosetests --with-coverage --cover-branches
....
Name Stmts Miss Branch BrPart Cover
-------------------------------------------------------
funcsigs.py 432 357 194 0 12%
funcsigs/version.py 1 0 0 0 100%
mock.py 4 0 0 0 100%
mock/mock.py 1373 987 578 44 23%
pbr.py 0 0 0 0 100%
pbr/version.py 218 116 66 16 42%
six.py 444 218 134 21 46%
dredd.py 0 0 0 0 100%
dredd/discovery.py 0 0 0 0 100%
dredd/dredd.py 28 0 18 1 98%
dredd/instance.py 9 1 0 0 89%
-------------------------------------------------------
TOTAL 2509 1679 990 82 28%
----------------------------------------------------------------------
Ran 4 tests in 0.026s
OK
_____________________________________________________________________________________________ summary ______________________________________________________________________________________________
py27: commands succeeded
congratulations :)
tox 3,67s user 0,87s system 12% cpu 37,636 total
好像是30秒超时,然后运行测试正常。
我尝试使用 ls -lah
作为命令和配置文件 tox,我得到了这些结果 http://pastebin.com/EtQh3Xhq.
我 运行 宁 OSX Yosemite 10.10.5
Python 和 tox 版本
$ python --version
Python 2.7.10
$ tox --version
2.3.1 imported from /Library/Python/2.7/site-packages/tox/__init__.pyc
我尝试过有和没有 setup.py
的项目,有或多或少的环境,我总是得到同样缓慢的时间。有人知道发生了什么事以及如何解决吗?
删除 $HOME/.tox 中安装的旧包解决了这个问题。似乎 30 秒是由于 boto 超时,其中一些包使用了 boto。虽然不知道为什么会这样。
Tox 几周前 运行ning 还不错,但我回到了一个使用 tox 进行 运行 测试的项目,现在它总是需要 30 秒才能 运行。我认为这可能是对项目所做更改的问题,但我在其他项目中尝试过 tox(甚至是 hello world 测试),它们都需要 30 秒才能 运行。
$ time tox
GLOB sdist-make: /private/tmp/dependency_manager/setup.py
py27 inst-nodeps: /private/tmp/dependency_manager/.tox/dist/dependencyManager-1.3.6.zip
py27 installed: boto==2.41.0,boto3==1.3.1,botocore==1.4.33,dependencyManager==1.3.6,docutils==0.12,funcsigs==1.0.2,futures==3.0.5,jmespath==0.9.0,mock==2.0.0,nose2==0.6.5,pbr==1.10.0,python-dateutil==2.5.3,six==1.10.0,troposphere==1.6.0
py27 runtests: PYTHONHASHSEED='3107006541'
py27 runtests: commands[0] | nose2
/private/tmp/dependency_manager/.tox/py27/lib/python2.7/site-packages/troposphere/dynamodb.py:10: UserWarning: This module is outdated and will be replaced with troposphere.dynamodb2. Please see the README for instructions on how to prepare for this change.
warnings.warn("This module is outdated and will be replaced with "
.....................
----------------------------------------------------------------------
Ran 21 tests in 0.020s
OK
_____________________________________________________________________________________________ summary ______________________________________________________________________________________________
py27: commands succeeded
congratulations :)
tox 1,67s user 0,43s system 6% cpu 32,192 total
现在是一个完全不同的项目。
$ time tox
py27 recreate: /Users/jose.armesto/dev/dredd/.tox/py27
py27 installdeps: nose, mock, coverage >= 3.3
py27 installed: coverage==4.1,funcsigs==1.0.2,mock==2.0.0,nose==1.3.7,pbr==1.10.0,six==1.10.0
py27 runtests: PYTHONHASHSEED='1261821084'
py27 runtests: commands[0] | nosetests --with-coverage --cover-branches
....
Name Stmts Miss Branch BrPart Cover
-------------------------------------------------------
funcsigs.py 432 357 194 0 12%
funcsigs/version.py 1 0 0 0 100%
mock.py 4 0 0 0 100%
mock/mock.py 1373 987 578 44 23%
pbr.py 0 0 0 0 100%
pbr/version.py 218 116 66 16 42%
six.py 444 218 134 21 46%
dredd.py 0 0 0 0 100%
dredd/discovery.py 0 0 0 0 100%
dredd/dredd.py 28 0 18 1 98%
dredd/instance.py 9 1 0 0 89%
-------------------------------------------------------
TOTAL 2509 1679 990 82 28%
----------------------------------------------------------------------
Ran 4 tests in 0.026s
OK
_____________________________________________________________________________________________ summary ______________________________________________________________________________________________
py27: commands succeeded
congratulations :)
tox 3,67s user 0,87s system 12% cpu 37,636 total
好像是30秒超时,然后运行测试正常。
我尝试使用 ls -lah
作为命令和配置文件 tox,我得到了这些结果 http://pastebin.com/EtQh3Xhq.
我 运行 宁 OSX Yosemite 10.10.5 Python 和 tox 版本
$ python --version
Python 2.7.10
$ tox --version
2.3.1 imported from /Library/Python/2.7/site-packages/tox/__init__.pyc
我尝试过有和没有 setup.py
的项目,有或多或少的环境,我总是得到同样缓慢的时间。有人知道发生了什么事以及如何解决吗?
删除 $HOME/.tox 中安装的旧包解决了这个问题。似乎 30 秒是由于 boto 超时,其中一些包使用了 boto。虽然不知道为什么会这样。