diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2013-11-28 15:07:41 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2013-11-29 16:11:31 +0000 |
commit | 5ceb033caf279016876643315a66ab2aad3095d1 (patch) | |
tree | 98db2b546731c6cbe11ec312bc121baed87268af /morphlib/morphloader_tests.py | |
parent | 5eafbe6c70910b5662c941f9f7a3c9befc61feea (diff) | |
download | morph-5ceb033caf279016876643315a66ab2aad3095d1.tar.gz |
morphloader: Don't use ValueError exception
Dedicated exceptions allow more fine-grained exception catching and can
have extra data.
Diffstat (limited to 'morphlib/morphloader_tests.py')
-rw-r--r-- | morphlib/morphloader_tests.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/morphlib/morphloader_tests.py b/morphlib/morphloader_tests.py index f38d58e8..2711db20 100644 --- a/morphlib/morphloader_tests.py +++ b/morphlib/morphloader_tests.py @@ -157,7 +157,8 @@ build-system: dummy } ] }) - self.assertRaises(ValueError, self.loader.validate, m) + self.assertRaises(morphlib.morphloader.DuplicateStratumError, + self.loader.validate, m) def test_validate_requires_unique_chunk_names_within_a_stratum(self): m = morphlib.morph3.Morphology( @@ -177,7 +178,8 @@ build-system: dummy } ] }) - self.assertRaises(ValueError, self.loader.validate, m) + self.assertRaises(morphlib.morphloader.DuplicateChunkError, + self.loader.validate, m) def test_validate_requires_a_valid_architecture(self): m = morphlib.morph3.Morphology( |