diff options
Diffstat (limited to 'morphlib/sysbranchdir.py')
-rw-r--r-- | morphlib/sysbranchdir.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/morphlib/sysbranchdir.py b/morphlib/sysbranchdir.py index 73a07d5e..1a8b898a 100644 --- a/morphlib/sysbranchdir.py +++ b/morphlib/sysbranchdir.py @@ -161,6 +161,20 @@ class SystemBranchDirectory(object): for dirname in morphlib.util.find_leaves(self.root_directory, '.git')) + # Not covered by unit tests, since testing the functionality spans + # multiple modules and only tests useful output with a full system + # branch, so it is instead covered by integration tests. + def load_all_morphologies(self, loader): # pragma: no cover + gd_name = self.get_git_directory_name(self.root_repository_url) + gd = morphlib.gitdir.GitDirectory(gd_name) + mf = morphlib.morphologyfinder.MorphologyFinder(gd) + for morph in mf.list_morphologies(): + text, filename = mf.read_morphology(morph) + m = loader.load_from_string(text, filename=filename) + m.repo_url = self.root_repository_url + m.ref = self.system_branch_name + yield m + def create(root_directory, root_repository_url, system_branch_name): '''Create a new system branch directory on disk. |