Exemple #1
0
def git_repo(runner):
    with runner.isolated_filesystem():
        r = git.Repo.init(".")
        mkdir_exists_ok("wandb")
        # Because the forked process doesn't use my monkey patch above
        with open("wandb/settings", "w") as f:
            f.write("[default]\nproject: test")
        open("README", "wb").close()
        r.index.add(["README"])
        r.index.commit("Initial commit")
        yield GitRepo(lazy=False)
Exemple #2
0
def git_repo_with_remote_and_empty_pass(runner):
    with runner.isolated_filesystem():
        r = git.Repo.init(".")
        r.create_remote("origin", "https://foo:@github.com/FooTest/Foo.git")
        yield GitRepo(lazy=False)
Exemple #3
0
def git_repo_with_remote_and_port(runner):
    with runner.isolated_filesystem():
        with git.Repo.init(".") as repo:
            repo.create_remote(
                "origin", "https://*****:*****@github.com:8080/FooTest/Foo.git")
            yield GitRepo(lazy=False)