git as hard requirement and 3.1.0
See original GitHub issueWith pytest-benchmark I could on a system without git use the --benchmark-skip option to run my tests. With 3.1.0 I get traceback below. Is it intentional that git must be available even if user just wants to run the regular tests?
Traceback (most recent call last):
File "/venv/bin/pytest", line 11, in <module>
sys.exit(main())
File "/venv/lib/python3.5/site-packages/_pytest/config.py", line 49, in main
config = _prepareconfig(args, plugins)
File "/venv/lib/python3.5/site-packages/_pytest/config.py", line 164, in _prepareconfig
pluginmanager=pluginmanager, args=args)
File "/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 745, in __call__
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
File "/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 339, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 334, in <lambda>
_MultiCall(methods, kwargs, hook.spec_opts).execute()
File "/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 613, in execute
return _wrapped_call(hook_impl.function(*args), self.execute)
File "/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 250, in _wrapped_call
wrap_controller.send(call_outcome)
File "/venv/lib/python3.5/site-packages/_pytest/helpconfig.py", line 67, in pytest_cmdline_parse
config = outcome.get_result()
File "/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 279, in get_result
raise ex[1].with_traceback(ex[2])
File "/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 265, in __init__
self.result = func()
File "/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
res = hook_impl.function(*args)
File "/venv/lib/python3.5/site-packages/_pytest/config.py", line 934, in pytest_cmdline_parse
self.parse(args)
File "/venv/lib/python3.5/site-packages/_pytest/config.py", line 1106, in parse
self._preparse(args, addopts=addopts)
File "/venv/lib/python3.5/site-packages/_pytest/config.py", line 1068, in _preparse
self.pluginmanager.load_setuptools_entrypoints('pytest11')
File "/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 516, in load_setuptools_entrypoints
self.register(plugin, name=ep.name)
File "/venv/lib/python3.5/site-packages/_pytest/config.py", line 258, in register
ret = super(PytestPluginManager, self).register(plugin, name)
File "/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 371, in register
hook._maybe_apply_history(hookimpl)
File "/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 768, in _maybe_apply_history
res = self._hookexec(self, [method], kwargs)
File "/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 339, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 334, in <lambda>
_MultiCall(methods, kwargs, hook.spec_opts).execute()
File "/venv/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
res = hook_impl.function(*args)
File "/venv/lib/python3.5/site-packages/pytest_benchmark/plugin.py", line 198, in pytest_addoption
tag = get_tag()
File "/venv/lib/python3.5/site-packages/pytest_benchmark/utils.py", line 87, in get_tag
info = get_commit_info(project_name)
File "/venv/lib/python3.5/site-packages/pytest_benchmark/utils.py", line 182, in get_commit_info
branch = get_branch_info()
File "/venv/lib/python3.5/site-packages/pytest_benchmark/utils.py", line 164, in get_branch_info
branch = cmd('git rev-parse --abbrev-ref HEAD').strip()
File "/venv/lib/python3.5/site-packages/pytest_benchmark/utils.py", line 160, in cmd
return check_output(args, stderr=subprocess.STDOUT, universal_newlines=True)
File "/usr/lib/python3.5/subprocess.py", line 316, in check_output
**kwargs).stdout
File "/usr/lib/python3.5/subprocess.py", line 383, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1282, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'git'
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
New resolver takes a very long time to complete #9187 - GitHub
The pip install -r requirements-min.txt command seems to loop infinitely after some time. This started to happen with 20.3, before it worked ...
Read more >Git - git Documentation
Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access...
Read more >Unable to import Repo from git in google colab even when git ...
git version it shows git version 2.17.1 . Any ideas where I am going wrong and why the code is not working are...
Read more >OpenAPI Specification v3.1.0 | Introduction, Definitions, & More
The source-of-truth for the specification is the GitHub markdown file ... making no distinction between 3.1.0 and 3.1.1 for example.
Read more >GitPython Tutorial — GitPython 3.1.29 documentation
GitPython provides object model access to your git repository. ... objects directly through binary streams, no working tree required assert (now.commit.tree ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hmmm … actually you’re right (it allows failures if bin exists but fails). I’ll fix this.
Awesome, thanks, works great