getpelican/pelican — pull request #899 by rptb1 (2013-05-21 23:00:50+00:00)
Title: Testing whether a reader class is enabled *before* calling it, otherwise...

... the test is never reached.

For example, if Markdown hasn't been installed, and you attempt read_file('foo.md') then an exception is raised in MarkdownReader.__init__ as it tries to call Markdown, which is False. The class field "enabled" was not checked before attempting to instantiate MarkdownReader. Instead, there is a later test on the instance, which won't be reached.

I've followed all steps in "How to Contribute" except Python 3.2 tests. Some Python 2.7 tests fail exactly as they do at the current master 675d6c81cd6ca88c8018bd608c46735ab29ba8b5

I found this bug while working on a test site with Docutils but not Markdown installed.