diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2012-11-12 15:58:27 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2012-11-12 17:09:44 +0000 |
commit | a5b913a83db94380fc91d15571f55cbf7b5c741b (patch) | |
tree | 9d03bffd2d010ec8f554c06e86cf2adb8bf1f632 /morphlib/cachedrepo_tests.py | |
parent | 1cc7a313d4a7c4dd348da1aab0e3b6108b6b48b9 (diff) | |
download | morph-a5b913a83db94380fc91d15571f55cbf7b5c741b.tar.gz |
Avoid caching repos that are on the local machine anyway
Currently the message is still displayed "Updating xxx" but no
update is actually done.
Diffstat (limited to 'morphlib/cachedrepo_tests.py')
-rw-r--r-- | morphlib/cachedrepo_tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/morphlib/cachedrepo_tests.py b/morphlib/cachedrepo_tests.py index 0ca0882f..81673880 100644 --- a/morphlib/cachedrepo_tests.py +++ b/morphlib/cachedrepo_tests.py @@ -246,6 +246,12 @@ class CachedRepoTests(unittest.TestCase): self.repo._update = self.update_with_failure self.assertRaises(cachedrepo.UpdateError, self.repo.update) + def test_no_update_if_local(self): + self.repo = cachedrepo.CachedRepo( + object(), 'local:repo', 'file:///local/repo/', '/local/repo/') + self.repo._update = self.update_with_failure + self.repo.update() + def test_clone_checkout(self): self.repo.clone_checkout('master', '/.DOES_NOT_EXIST') self.assertEqual(self.clone_target, '/.DOES_NOT_EXIST') |