Skip to content

test(clone): verify stderr for a failing clone into a non-empty dir #1225

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

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix flake
  • Loading branch information
Byron committed Apr 22, 2021
commit 86c01a22047e7bb86c3c72a4aa82e04309a54d63
4 changes: 3 additions & 1 deletion test/test_clone.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@
with_rw_directory,
)


class TestClone(TestBase):
@with_rw_directory
def test_checkout_in_non_empty_dir(self, rw_dir):
non_empty_dir = Path(rw_dir)
garbage_file = non_empty_dir / 'not-empty'
garbage_file.write_text('Garbage!')

# Verify that cloning into the non-empty dir fails while complaining about the target directory not being empty/non-existent
# Verify that cloning into the non-empty dir fails while complaining about
# the target directory not being empty/non-existent
try:
self.rorepo.clone(non_empty_dir)
except git.GitCommandError as exc:
Expand Down