summaryrefslogtreecommitdiff
path: root/morphlib/localrepocache_tests.py
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2012-11-12 15:58:27 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2012-11-12 17:09:44 +0000
commita5b913a83db94380fc91d15571f55cbf7b5c741b (patch)
tree9d03bffd2d010ec8f554c06e86cf2adb8bf1f632 /morphlib/localrepocache_tests.py
parent1cc7a313d4a7c4dd348da1aab0e3b6108b6b48b9 (diff)
downloadmorph-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/localrepocache_tests.py')
-rw-r--r--morphlib/localrepocache_tests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/morphlib/localrepocache_tests.py b/morphlib/localrepocache_tests.py
index 26a92616..6c5410ce 100644
--- a/morphlib/localrepocache_tests.py
+++ b/morphlib/localrepocache_tests.py
@@ -163,3 +163,8 @@ class LocalRepoCacheTests(unittest.TestCase):
def test_noremote_error_message_contains_repo_name(self):
e = morphlib.localrepocache.NoRemote(self.repourl, [])
self.assertTrue(self.repourl in str(e))
+
+ def test_avoids_caching_local_repo(self):
+ self.lrc.cache_repo('file:///local/repo')
+ cached = self.lrc.get_repo('file:///local/repo')
+ assert cached.path == '/local/repo'