复制代码
- C:\Users\chenlibao>pytest --version
- Traceback (most recent call last):
- File "c:\python37\lib\runpy.py", line 193, in _run_module_as_main
- "__main__", mod_spec)
- File "c:\python37\lib\runpy.py", line 85, in _run_code
- exec(code, run_globals)
- File "C:\Python37\Scripts\pytest.exe\__main__.py", line 9, in <module>
- File "c:\python37\lib\site-packages\_pytest\config\__init__.py", line 185, in console_main
- code = main()
- File "c:\python37\lib\site-packages\_pytest\config\__init__.py", line 143, in main
- config = _prepareconfig(args, plugins)
- File "c:\python37\lib\site-packages\_pytest\config\__init__.py", line 319, in _prepareconfig
- pluginmanager=pluginmanager, args=args
- File "c:\python37\lib\site-packages\pluggy\hooks.py", line 286, in __call__
- return self._hookexec(self, self.get_hookimpls(), kwargs)
- File "c:\python37\lib\site-packages\pluggy\manager.py", line 93, in _hookexec
- return self._inner_hookexec(hook, methods, kwargs)
- File "c:\python37\lib\site-packages\pluggy\manager.py", line 87, in <lambda>
- firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
- File "c:\python37\lib\site-packages\pluggy\callers.py", line 203, in _multicall
- gen.send(outcome)
- File "c:\python37\lib\site-packages\_pytest\helpconfig.py", line 100, in pytest_cmdline_parse
- config: Config = outcome.get_result()
- File "c:\python37\lib\site-packages\pluggy\callers.py", line 80, in get_result
- raise ex[1].with_traceback(ex[2])
- File "c:\python37\lib\site-packages\pluggy\callers.py", line 187, in _multicall
- res = hook_impl.function(*args)
- File "c:\python37\lib\site-packages\_pytest\config\__init__.py", line 1003, in pytest_cmdline_parse
- self.parse(args)
- File "c:\python37\lib\site-packages\_pytest\config\__init__.py", line 1283, in parse
- self._preparse(args, addopts=addopts)
- File "c:\python37\lib\site-packages\_pytest\config\__init__.py", line 1172, in _preparse
- self.pluginmanager.load_setuptools_entrypoints("pytest11")
- File "c:\python37\lib\site-packages\pluggy\manager.py", line 299, in load_setuptools_entrypoints
- plugin = ep.load()
- File "c:\python37\lib\site-packages\importlib_metadata\__init__.py", line 94, in load
- module = import_module(match.group('module'))
- File "c:\python37\lib\importlib\__init__.py", line 127, in import_module
- return _bootstrap._gcd_import(name[level:], package, level)
- File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
- File "<frozen importlib._bootstrap>", line 983, in _find_and_load
- File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
- File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
- File "c:\python37\lib\site-packages\_pytest\assertion\rewrite.py", line 170, in exec_module
- exec(co, module.__dict__)
- File "c:\python37\lib\site-packages\celery\contrib\pytest.py", line 6, in <module>
- from .testing import worker
- File "<frozen importlib._bootstrap>", line 983, in _find_and_load
- File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
- File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
- File "c:\python37\lib\site-packages\_pytest\assertion\rewrite.py", line 170, in exec_module
- exec(co, module.__dict__)
- File "c:\python37\lib\site-packages\celery\contrib\testing\worker.py", line 6, in <module>
- from celery import worker
- File "<frozen importlib._bootstrap>", line 983, in _find_and_load
- File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
- File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
- File "c:\python37\lib\site-packages\_pytest\assertion\rewrite.py", line 170, in exec_module
- exec(co, module.__dict__)
- File "c:\python37\lib\site-packages\celery\worker\__init__.py", line 3, in <module>
- from .worker import WorkController
- File "<frozen importlib._bootstrap>", line 983, in _find_and_load
- File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
- File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
- File "c:\python37\lib\site-packages\_pytest\assertion\rewrite.py", line 161, in exec_module
- source_stat, co = _rewrite_test(fn, self.config)
- File "c:\python37\lib\site-packages\_pytest\assertion\rewrite.py", line 354, in _rewrite_test
- tree = ast.parse(source, filename=fn_)
- File "c:\python37\lib\ast.py", line 35, in parse
- return compile(source, filename, mode, PyCF_ONLY_AST)
- File "c:\python37\lib\site-packages\celery\worker\worker.py", line 241
- self._conninfo.transport.implements.async and
- ^
- SyntaxError: invalid syntax
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) | Powered by Discuz! X3.2 |