-
Notifications
You must be signed in to change notification settings - Fork 710
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix test flakiness on windows (cherry picked from commit 67b8208)
- Loading branch information
1 parent
1c18d9c
commit 66578b7
Showing
2 changed files
with
22 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -166,39 +166,41 @@ def disable_git_save(): | |
@pytest.fixture | ||
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) | ||
with git.Repo.init(".") as repo: | ||
mkdir_exists_ok("wandb") | ||
# Because the forked process doesn't use my monkey patch above | ||
with open(os.path.join("wandb", "settings"), "w") as f: | ||
f.write("[default]\nproject: test") | ||
open("README", "wb").close() | ||
repo.index.add(["README"]) | ||
repo.index.commit("Initial commit") | ||
yield GitRepo(lazy=False) | ||
|
||
|
||
@pytest.fixture | ||
def git_repo_with_remote(runner): | ||
with runner.isolated_filesystem(): | ||
r = git.Repo.init(".") | ||
r.create_remote("origin", "https://foo:[email protected]/FooTest/Foo.git") | ||
yield GitRepo(lazy=False) | ||
with git.Repo.init(".") as repo: | ||
repo.create_remote("origin", "https://foo:[email protected]/FooTest/Foo.git") | ||
yield GitRepo(lazy=False) | ||
|
||
|
||
@pytest.fixture | ||
def git_repo_with_remote_and_port(runner): | ||
with runner.isolated_filesystem(): | ||
r = git.Repo.init(".") | ||
r.create_remote("origin", "https://foo:[email protected]:8080/FooTest/Foo.git") | ||
yield GitRepo(lazy=False) | ||
with git.Repo.init(".") as repo: | ||
repo.create_remote( | ||
"origin", "https://foo:[email protected]:8080/FooTest/Foo.git" | ||
) | ||
yield GitRepo(lazy=False) | ||
|
||
|
||
@pytest.fixture | ||
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) | ||
with git.Repo.init(".") as repo: | ||
repo.create_remote("origin", "https://foo:@github.com/FooTest/Foo.git") | ||
yield GitRepo(lazy=False) | ||
|
||
|
||
@pytest.fixture | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters