py.test --version不起作用,并在我已安装pytest时给出错误

时间:2013-08-18 21:13:48

标签: python pytest

追踪(最近一次呼叫最后一次):

  File "C:\Python33\Scripts\py.test-script.py", line 9, in <module>
    load_entry_point('pytest==2.3.5', 'console_scripts', 'py.test')()
      File "C:\Python33\lib\site-packages\pytest-2.3.5-py3.3.egg\_pytest\core.py", line 492, in main

    config = _prepareconfig(args, plugins)
  File "C:\Python33\lib\site-packages\pytest-2.3.5-py3.3.egg\_pytest\core.py", line 482, in _prepareconfig
        pluginmanager=_pluginmanager, args=args)
      File "C:\Python33\lib\site-packages\pytest-2.3.5-py3.3.egg\_pytest\core.py", line 441, in __call__
        return self._docall(methods, kwargs)

  File "C:\Python33\lib\site-packages\pytest-2.3.5-py3.3.egg\_pytest\core.py", line 452, in _docall
        res = mc.execute()
      File "C:\Python33\lib\site-packages\pytest-2.3.5-py3.3.egg\_pytest\core.py", line 370, in execute
        res = method(**kwargs)
          File "C:\Python33\lib\site-packages\pytest-2.3.5-py3.3.egg\_pytest\helpconfig.py", line 25, in pytest_cmdline_parse
        config = __multicall__.execute()
      File "C:\Python33\lib\site-packages\pytest-2.3.5-py3.3.egg\_pytest\core.py", line 370, in execute
        res = method(**kwargs)
      File "C:\Python33\lib\site-packages\pytest-2.3.5-py3.3.egg\_pytest\config.py", line 10, in pytest_cmdline_parse
        config.parse(args)
      File "C:\Python33\lib\site-packages\pytest-2.3.5-py3.3.egg\_pytest\config.py", line 373, in parse
        self._preparse(args)
      File "C:\Python33\lib\site-packages\pytest-2.3.5-py3.3.egg\_pytest\config.py", line 349, in _preparse
        self.pluginmanager.consider_setuptools_entrypoints()
      File "C:\Python33\lib\site-packages\pytest-2.3.5-py3.3.egg\_pytest\core.py", line 174, in consider_setuptools_entrypoints
        plugin = ep.load()
      File "C:\Python33\lib\site-packages\setuptools-1.0-py3.3.egg\pkg_resources.py", line 2108, in load
      File "<frozen importlib._bootstrap>", line 1567, in _find_and_load
      File "<frozen importlib._bootstrap>", line 1534, in _find_and_load_unlocked
      File "C:\Python33\lib\site-packages\pytest_mozwebqa-1.1.1-py3.3.egg\pytest_mozwebqa\__init__.py", line 3, in <module>

NameError: name 'pytest_mozwebqa' is not defined

1 个答案:

答案 0 :(得分:0)

这是Python 3.3的兼容性问题。安装Python 2.6后,它工作正常。