需要帮助升级pytest
。在 3.2.4 的情况下,如果我移动到 3.3.x 或 3.4.x,我会收到一个我不理解的错误,我什至无法执行该-h
参数。不知道从哪里开始或为什么会发生这种情况。也许我的问题virtualenv
?
新鲜的虚拟环境
我确实尝试从一个全新的 virtualenv 开始,但是,我仍然遇到同样的错误。恢复到3.2.4
修复它。
在职的:
$ pytest --version
This is pytest version 3.2.4, imported from /Users/me/.virtualenvs/hitcount/lib/python3.5/site-packages/pytest.py
升级到 3.3.x
$ pytest --version
This is pytest version 3.3.2, imported from /Users/me/.virtualenvs/hitcount/lib/python3.5/site-packages/pytest.py
$ pytest --help
Traceback (most recent call last):
File "/Users/me/.virtualenvs/hitcount/bin/pytest", line 11, in <module>
sys.exit(main())
File "/Users/me/.virtualenvs/hitcount/lib/python3.5/site-packages/_pytest/config.py", line 59, in main
return config.hook.pytest_cmdline_main(config=config)
File "/Users/me/.virtualenvs/hitcount/lib/python3.5/site-packages/pluggy/__init__.py", line 617, in __call__
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
File "/Users/me/.virtualenvs/hitcount/lib/python3.5/site-packages/pluggy/__init__.py", line 222, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/Users/me/.virtualenvs/hitcount/lib/python3.5/site-packages/pluggy/__init__.py", line 216, in <lambda>
firstresult=hook.spec_opts.get('firstresult'),
File "/Users/me/.virtualenvs/hitcount/lib/python3.5/site-packages/pluggy/callers.py", line 201, in _multicall
return outcome.get_result()
File "/Users/me/.virtualenvs/hitcount/lib/python3.5/site-packages/pluggy/callers.py", line 76, in get_result
raise ex[1].with_traceback(ex[2])
File "/Users/me/.virtualenvs/hitcount/lib/python3.5/site-packages/pluggy/callers.py", line 180, in _multicall
res = hook_impl.function(*args)
File "/Users/me/.virtualenvs/hitcount/lib/python3.5/site-packages/_pytest/helpconfig.py", line 102, in pytest_cmdline_main
config._do_configure()
File "/Users/me/.virtualenvs/hitcount/lib/python3.5/site-packages/_pytest/config.py", line 921, in _do_configure
self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
File "/Users/me/.virtualenvs/hitcount/lib/python3.5/site-packages/pluggy/__init__.py", line 630, in call_historic
proc(x)
TypeError: 'NoneType' object is not callable
资源:
这是我维护的一个开源项目:https ://github.com/thornomad/django-hitcount