简体   繁体   English

使用鼻子+ GAE插件进行Python单元测试

[英]Python unit-testing with nose + GAE plugin

Since today morning I'm having some weird problem with Python's unit-testing tool Nose + NoseGAE. 从今天早上开始,我对Python的单元测试工具Nose + NoseGAE遇到了一些奇怪的问题。 I want to run unit-tests for my GAE project in terminal and it ends with this error: 我想在终端中为我的GAE项目运行单元测试,结果以以下错误结束:

Traceback (most recent call last):
  File "/usr/local/bin/nosetests", line 8, in <module>
    load_entry_point('nose==1.2.1', 'console_scripts', 'nosetests')()
  File "/Library/Python/2.7/site-packages/nose-1.2.1-py2.7.egg/nose/core.py", line 118, in __init__
    **extra_args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/main.py", line 94, in __init__
    self.parseArgs(argv)
  File "/Library/Python/2.7/site-packages/nose-1.2.1-py2.7.egg/nose/core.py", line 135, in parseArgs
    self.config.configure(argv, doc=self.usage())
  File "/Library/Python/2.7/site-packages/nose-1.2.1-py2.7.egg/nose/config.py", line 338, in configure
    self.plugins.configure(options, self)
  File "/Library/Python/2.7/site-packages/nose-1.2.1-py2.7.egg/nose/plugins/manager.py", line 284, in configure
    cfg(options, config)
  File "/Library/Python/2.7/site-packages/nose-1.2.1-py2.7.egg/nose/plugins/manager.py", line 99, in __call__
    return self.call(*arg, **kw)
  File "/Library/Python/2.7/site-packages/nose-1.2.1-py2.7.egg/nose/plugins/manager.py", line 167, in simple
    result = meth(*arg, **kw)
  File "build/bdist.macosx-10.7-intel/egg/nosegae.py", line 84, in configure
  File "/usr/local/google_appengine/google/appengine/tools/dev_appserver.py", line 61, in <module>
    import simplejson
ImportError: No module named simplejson

It's weird because I'm not even using simplejson anywhere. 这很奇怪,因为我什至没有在任何地方使用simplejson I know it's part of Django, but I'm not using it either. 我知道它是Django的一部分,但我也没有使用它。

OS X 10.7.4 OS X 10.7.4
Python 2.7.1 Python 2.7.1
Nose 1.2.1 鼻子1.2.1
NoseGAE 0.2.0 鼻子GAE 0.2.0

Do you have any idea what might be wrong? 您知道什么地方可能出问题吗?

在OS X上的旧版GAE中,这可能只是暂时的问题。新版本可以正常运行。

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

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