-
-
Notifications
You must be signed in to change notification settings - Fork 941
change the HOME for git commands #649
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,6 +39,11 @@ def get(self): | |
| yield TmpdirFactory() | ||
|
|
||
|
|
||
| @pytest.fixture() | ||
| def setup_git(monkeypatch, tmpdir): | ||
| # we should not use user configuration | ||
| monkeypatch.setenv('HOME', tmpdir) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we had the same situation in pre-commit-hooks and I think this is the wrong solution as it has the potential to hide problems with different configurations. We instead opted to pass
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this fixture also doesn't scale (adding it to literally every test) -- perhaps instead an
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see |
||
|
|
||
| @pytest.yield_fixture | ||
| def in_tmpdir(tempdir_factory): | ||
| path = tempdir_factory.get() | ||
|
|
@@ -67,7 +72,7 @@ def _make_conflict(): | |
|
|
||
|
|
||
| @pytest.yield_fixture | ||
| def in_merge_conflict(tempdir_factory): | ||
| def in_merge_conflict(tempdir_factory, setup_git): | ||
| path = make_consuming_repo(tempdir_factory, 'script_hooks_repo') | ||
| with cwd(path): | ||
| open('dummy', 'a').close() | ||
|
|
@@ -82,7 +87,7 @@ def in_merge_conflict(tempdir_factory): | |
|
|
||
|
|
||
| @pytest.yield_fixture | ||
| def in_conflicting_submodule(tempdir_factory): | ||
| def in_conflicting_submodule(tempdir_factory, setup_git): | ||
| git_dir_1 = git_dir(tempdir_factory) | ||
| git_dir_2 = git_dir(tempdir_factory) | ||
| with cwd(git_dir_2): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without bash, most of the testsuite is useless -- pre-commit tests lots of the framework functionality with script hooks as they are fast. I don't think I can accept a PR which adds skips for
bash. Asbashis necessarily installed on all the platforms we support (it's necessary forgititself to function) this also seems inappropriate.