From 924e2192ae3de5974ee058c0ea9c180f2e46d78e Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Thu, 19 Sep 2013 10:27:36 +0000 Subject: MorphSet: add a list_refs() method This will be used to factor the morphology traversal code out of petrify, since it is cleaner to find out which refs are present, resolve them, then update them, instead of the previous approach which updated as part of the traversal. --- morphlib/morphset_tests.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'morphlib/morphset_tests.py') diff --git a/morphlib/morphset_tests.py b/morphlib/morphset_tests.py index 69a7057f..24f3d91a 100644 --- a/morphlib/morphset_tests.py +++ b/morphlib/morphset_tests.py @@ -185,3 +185,9 @@ class MorphologySetTests(unittest.TestCase): } ]) + def test_list_refs(self): + self.morphs.add_morphology(self.system) + self.morphs.add_morphology(self.stratum) + self.assertEqual(sorted(self.morphs.list_refs()), + [('test:foo-chunk', 'master'), + ('test:morphs', 'master')]) -- cgit v1.2.1