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/localrepocache_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/localrepocache_tests.py')
-rw-r--r-- | morphlib/localrepocache_tests.py | 5 |
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' |