This commit is contained in:
@@ -2,6 +2,7 @@ import pathlib
|
||||
import sys
|
||||
import tempfile
|
||||
import unittest
|
||||
import unittest.mock
|
||||
|
||||
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
|
||||
|
||||
@@ -108,6 +109,11 @@ class LocateTest(unittest.TestCase):
|
||||
self.origins[str(self.billing)] = "billing"
|
||||
self.assertIn(f"{self.billing} has an origin, billing, with no host and owner to put another repo under", self.unsure(FakeGit(self.origins)))
|
||||
|
||||
def test_asks_all_the_same_where_the_leftovers_of_a_failed_clone_cannot_be_removed(self) -> None:
|
||||
self.configure()
|
||||
with unittest.mock.patch("do_epic.repos.shutil.rmtree", side_effect=lambda path, ignore_errors: None if ignore_errors is True else self.fail("rmtree must ignore errors")):
|
||||
self.assertIn("cannot clone", self.unsure(FakeGit(self.origins, refused="git@github.com:acme/ledger")))
|
||||
|
||||
def test_asks_where_the_clone_fails_naming_the_url_and_the_reason(self) -> None:
|
||||
self.configure()
|
||||
asked = self.unsure(FakeGit(self.origins, refused="git@github.com:acme/ledger"))
|
||||
|
||||
Reference in New Issue
Block a user