summaryrefslogtreecommitdiff
path: root/morphlib/source_tests.py
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-04-10 16:12:06 +0100
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-04-10 16:28:13 +0100
commitcaaa37d42dec002ffe20f2152767f3ce37cb1bf5 (patch)
tree9bfb0e630f0688aeb31940212da5c32e738cf74f /morphlib/source_tests.py
parent7ec6cd23cefe5e116a54c6c0cb2aa0669adcd991 (diff)
downloadmorph-caaa37d42dec002ffe20f2152767f3ce37cb1bf5.tar.gz
Add SourcePool class and make Source store its morphology filename
Diffstat (limited to 'morphlib/source_tests.py')
-rw-r--r--morphlib/source_tests.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/morphlib/source_tests.py b/morphlib/source_tests.py
index 79ccf408..f9999ca0 100644
--- a/morphlib/source_tests.py
+++ b/morphlib/source_tests.py
@@ -32,10 +32,11 @@ class SourceTests(unittest.TestCase):
self.repo = 'foo.repo'
self.sha1 = 'CAFEF00D'
self.morphology = morphlib.morph2.Morphology(self.morphology_text)
+ self.filename = 'foo.morph'
self.source = morphlib.source.Source(self.repo, self.sha1,
- self.morphology)
+ self.morphology, self.filename)
self.other = morphlib.source.Source(self.repo, self.sha1,
- self.morphology)
+ self.morphology, self.filename)
def test_sets_repo(self):
self.assertEqual(self.source.repo, self.repo)
@@ -46,6 +47,9 @@ class SourceTests(unittest.TestCase):
def test_sets_morphology(self):
self.assertEqual(self.source.morphology, self.morphology)
+ def test_sets_filename(self):
+ self.assertEqual(self.source.filename, self.filename)
+
def test_sets_dependencies_to_empty(self):
self.assertEqual(self.source.dependencies, [])