-
Notifications
You must be signed in to change notification settings - Fork 14
add tests - part 1 #2
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
Conversation
| return GitFileSystem(scm=self, rev=rev) | ||
|
|
||
| @classmethod | ||
| def init( |
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.
I implemented init and added tests for all backends.
| pass | ||
| raise NoGitBackendError("init") | ||
|
|
||
| def add_commit( |
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.
We don't have scm_gen, so I added this add_commit to simplify tests. It's questionable, but scmrepo should also aim to provide higher-level APIs than underlying backends.
| defaultBranch=master | ||
| """ | ||
| (home_dir / ".gitconfig").write_bytes(contents) | ||
| pygit2.settings.search_path[pygit2.GIT_CONFIG_LEVEL_GLOBAL] = str(home_dir) |
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.
Seems like pygit2 does not use the monkeypatched environment variable, so we have to set manually.
Migrating https://github.com/iterative/dvc/blob/004e15c2c00a24c7a8fba88611def600a9dd223f/tests/unit/scm/test_git.py.