简体   繁体   English

使用鼻子进行测试时出错

[英]Error when running tests with nose-gae

I've been using nose-gae for awhile, and I just updated to release 0.3.0, which is only 3 days old. 我已经使用过一段时间了,我刚刚更新到发布0.3.0,这只有3天的时间。 I'm running GAE SDK 1.9.17 on Mac OS X Yosemite. 我在Mac OS X Yosemite上运行GAE SDK 1.9.17。

When I run my tests, I get the following error: 运行测试时,出现以下错误:

/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file '/Library/Frameworks/Python.framework/Versions/2.7/bin/_python_runtime.py': [Errno 2] No such file or directory /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python:无法打开文件'/Library/Frameworks/Python.framework/Versions/2.7/bin/_python_runtime.py' :[Errno 2]没有这样的文件或目录

Sure enough, that file doesn't exist. 果然,该文件不存在。 My tests appear to run successfully however (test output below). 我的测试似乎运行成功(下面的测试输出)。 I don't see any such errors when running the dev_appserver. 运行dev_appserver时看不到任何此类错误。

I don't know what _python_runtime.py is and what is causing the error. 我不知道_python_runtime.py是什么以及导致错误的原因。 Any help figuring out what is going on would be appreciated. 任何帮助找出正在发生的事情将不胜感激。

==== ====

$ nosetests -x tests/functional_tests.py
................/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file '/Library/Frameworks/Python.framework/Versions/2.7/bin/_python_runtime.py': [Errno 2] No such file or directory
...
----------------------------------------------------------------------
Ran 19 tests in 11.032s

OK

This module _python_runtime.py should be in the SDK root folder. 此模块_python_runtime.py应位于SDK根文件夹中。 (confirmation here https://code.google.com/p/googleappengine/source/browse/trunk/python/ ) (在此处确认https://code.google.com/p/googleappengine/source/browse/trunk/python/

Are you sure that it is included in your PATH? 您确定它已包含在PATH中吗? If yes -- it is best to fill an issue here , such nose-gae still buggy after update. 如果是的话-最好在这里填写一个问题,这样的鼻孔仍然在更新后出现问题。

UPDATE this issue is solved with latest NoseGAE update, which is currently in dev branch here . 更新这个问题的解决,是最新NoseGAE更新,这是目前在Dev分支这里 Just clone it and use sudo python setup.py install to update it. 只需克隆它,然后使用sudo python setup.py install进行更新即可。

I think the problem is that nose-gae uses the old devappserver rather than the newer one. 我认为问题在于,nose-gae使用的是旧的devappserver而不是更新的devappserver。 The old devappserver was removed from the SDK in 1.9.17. 在1.9.17中,旧的devappserver已从SDK中删除。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM