diff options
author | Waylan Limberg <waylan@gmail.com> | 2012-07-12 08:02:02 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2012-07-12 08:02:02 -0400 |
commit | 5b3e724fb78da73ab87fb34e4ac9d9299773cfed (patch) | |
tree | 8db6aa7750974d1086eeeae9b53aa9e1d4205924 /tests | |
parent | 32d57ffdee6eae3e7dbe0a7ccc08c5d4aa27728e (diff) | |
download | markdown-5b3e724fb78da73ab87fb34e4ac9d9299773cfed.tar.gz markdown-5b3e724fb78da73ab87fb34e4ac9d9299773cfed.tar.bz2 markdown-5b3e724fb78da73ab87fb34e4ac9d9299773cfed.zip |
Fixed #112 and cleaned up error reporting when loading extensions.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_apis.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_apis.py b/tests/test_apis.py index 0296f27..31a60e1 100644 --- a/tests/test_apis.py +++ b/tests/test_apis.py @@ -245,18 +245,18 @@ class TestErrors(unittest.TestCase): def testLoadExtensionFailure(self): """ Test failure of an extension to load. """ - self.assertRaises(ValueError, + self.assertRaises(ImportError, markdown.Markdown, extensions=['non_existant_ext']) def testLoadBadExtension(self): """ Test loading of an Extension with no makeExtension function. """ _create_fake_extension(name='fake', has_factory_func=False) - self.assertRaises(ValueError, markdown.Markdown, extensions=['fake']) + self.assertRaises(AttributeError, markdown.Markdown, extensions=['fake']) def testNonExtension(self): """ Test loading a non Extension object as an extension. """ _create_fake_extension(name='fake', is_wrong_type=True) - self.assertRaises(ValueError, markdown.Markdown, extensions=['fake']) + self.assertRaises(TypeError, markdown.Markdown, extensions=['fake']) def testBaseExtention(self): """ Test that the base Extension class will raise NotImplemented. """ |