summaryrefslogtreecommitdiff
path: root/morphlib/morphologyfactory_tests.py
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-06-26 10:59:56 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-06-26 10:59:56 +0000
commitc8c325f3573c0dba853e472ff157e4c6ba0f1554 (patch)
treebf3e27323c66df6ec5a608c058b7ffbb8dfb405c /morphlib/morphologyfactory_tests.py
parent7309431873fd9f9e5f6a39025d75e3305c3c8a19 (diff)
parent244feb97ef207ba724f080826d6b4ad3a2d7cd33 (diff)
downloadmorph-c8c325f3573c0dba853e472ff157e4c6ba0f1554.tar.gz
Merge remote-tracking branch 'origin/baserock/richardipsum/improve_getmorph_errmsg'
Reviewed-by: Lars Wirzenius Reviewed-by: Emmet Hikory
Diffstat (limited to 'morphlib/morphologyfactory_tests.py')
-rw-r--r--morphlib/morphologyfactory_tests.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/morphlib/morphologyfactory_tests.py b/morphlib/morphologyfactory_tests.py
index 39092857..47bf3153 100644
--- a/morphlib/morphologyfactory_tests.py
+++ b/morphlib/morphologyfactory_tests.py
@@ -19,7 +19,7 @@ import unittest
import morphlib
from morphlib.morph2 import Morphology
from morphlib.morphologyfactory import (MorphologyFactory,
- AutodetectError,
+ MorphologyNotFoundError,
NotcachedError)
from morphlib.remoterepocache import CatFileError
@@ -234,16 +234,15 @@ class MorphologyFactoryTests(unittest.TestCase):
'assumed-remote.morph')
self.assertEqual('assumed-remote', morph['name'])
- def test_raises_error_when_fails_detect_locally(self):
+ def test_raises_error_when_no_local_morph(self):
self.lr.cat = self.nolocalfile
- self.assertRaises(AutodetectError, self.mf.get_morphology,
+ self.assertRaises(MorphologyNotFoundError, self.mf.get_morphology,
'reponame', 'sha1', 'unreached.morph')
- def test_raises_error_when_fails_detect_remotely(self):
+ def test_raises_error_when_fails_no_remote_morph(self):
self.lrc.has_repo = self.doesnothaverepo
self.rrc.cat_file = self.noremotefile
-# self.mf.get_morphology('reponame', 'sha1', 'unreached.morph')
- self.assertRaises(AutodetectError, self.mf.get_morphology,
+ self.assertRaises(MorphologyNotFoundError, self.mf.get_morphology,
'reponame', 'sha1', 'unreached.morph')
def test_raises_error_when_name_mismatches(self):