summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2014-08-08 09:06:50 +0000
committerAdam Coldrick <adam.coldrick@codethink.co.uk>2014-08-08 15:22:49 +0000
commita31b78e52e85343073802b09c8ef0454ad8c8e9d (patch)
tree436d619140ec6ae2178f39ff49a3de1cdef13c0d
parent1a6fb660b94228745efc4543138b9dc1fa50e912 (diff)
downloadmorph-a31b78e52e85343073802b09c8ef0454ad8c8e9d.tar.gz
cachedrepo: Remove unused load_morphology method
-rw-r--r--morphlib/cachedrepo.py9
-rw-r--r--morphlib/cachedrepo_tests.py4
2 files changed, 0 insertions, 13 deletions
diff --git a/morphlib/cachedrepo.py b/morphlib/cachedrepo.py
index 996b42f7..88ceed48 100644
--- a/morphlib/cachedrepo.py
+++ b/morphlib/cachedrepo.py
@@ -195,15 +195,6 @@ class CachedRepo(object):
self._checkout_ref(ref, target_dir)
- def load_morphology(self, ref, name):
- '''Loads a morphology from a given ref'''
-
- if not morphlib.git.is_valid_sha1(ref):
- ref = self._rev_parse(ref)
- text = self.cat(ref, '%s.morph' % name)
- morphology = morphlib.morph2.Morphology(text)
- return morphology
-
def ls_tree(self, ref):
'''Return file names found in root tree. Does not recurse to subtrees.
diff --git a/morphlib/cachedrepo_tests.py b/morphlib/cachedrepo_tests.py
index 74c16591..d3ae331a 100644
--- a/morphlib/cachedrepo_tests.py
+++ b/morphlib/cachedrepo_tests.py
@@ -219,10 +219,6 @@ class CachedRepoTests(unittest.TestCase):
morph_filename = os.path.join(unpack_dir, 'foo.morph')
self.assertTrue(os.path.exists(morph_filename))
- def test_load_morphology_from_existing_ref(self):
- morph = self.repo.load_morphology('master', 'foo')
- self.assertTrue(morph['name'] == 'foo')
-
def test_ls_tree_in_existing_ref(self):
data = self.repo.ls_tree('e28a23812eadf2fce6583b8819b9c5dbd36b9fb9')
self.assertEqual(data, ['foo.morph'])