summaryrefslogtreecommitdiff
path: root/morphlib/morphologyfinder_tests.py
Commit message (Collapse)AuthorAgeFilesLines
* morphlib: Add MorphologyFinder classRichard Maw2013-09-051-0/+111
MorphologyFinder is a small wrapper on top of GitDirectory that allows the inspection of morphologies in the repository. Its purpose is to isolate the logic for reading morphologies into one place. It is used by passing a GitDirectory and optionally a ref to the MorpholgyFinder constructor, then list_morphologies and read_morphology may be used. The ref is passed directly to the GitDirectory, so its semantics for a ref of None or omitted are used. i.e. It uses the working tree. Ref resolving is deferred until a morphology is listed or read, so it will not raise an exception for an invalid ref until then.