The default configuration for the warnings module changed some time ago
so we lost the ability to detect deprecation warnings and such early.
This commit sets up the test suite to redirect all warnings through our
logging system. Additionally we enable DeprecationWarnings as a default
and throw exceptions on all warnings related to pelican modules.
This enables output of warnings related to dependencies, while letting
tests only fail if the warnings are originating from pelican's source.
Also adding a test to detect if warnings cause an Exception as expected.
The BLOGROLL_WIDGET_NAME and SOCIAL_WIDGET_NAME settings are now
respected by notmyidea if they are specified in your config file.
They override the default names of "blogroll" and "links" in the
notmyidea theme.
Used default() in template to simplify template code.
Renaming BLOGROLL setting to LINKS, changed default also.
Updated tests to check 'links' instead of 'blogroll'.
Whoops; links, not link.
Tox uses dev_requirements.txt to install things. That wasn't the
original purpose of the dev_requirements.txt file, but for now these
additions will have to remain a documentation issue until this can be
sorted out properly.
Upon import of a dotclear backup, `pelican-import` returned this stacktrace:
```
File "/usr/bin/pelican-import", line 11, in <module>
sys.exit(main())
File "/usr/lib/python3.4/site-packages/pelican/tools/pelican_import.py", line 809, in main
attachments = attachments or None)
File "/usr/lib/python3.4/site-packages/pelican/tools/pelican_import.py", line 621, in fields2pelican
kind, in_markup) in fields:
File "/usr/lib/python3.4/site-packages/pelican/tools/pelican_import.py", line 262, in dc2fields
if int(tag[:1]) == 1:
ValueError: invalid literal for int() with base 10: 'a'
```
The write_feed function now takes an override_output parameter that
does the same thing as override_output does to write_file. Implemented
for custom generators.
If an unknown replacement indicator {bla} was used, it was ignored
silently. This commit adds a warning when an unmatched indicator occurs
to help identify the issue.
closes#1794
The following file is missing from the PyPI source distribution (sdist) due to *.markdown not being referenced in MANIFEST.in:
pelican/tests/content/article_with_markdown_extension.markdown
This missing file appears to cause a number of errors running the test suite. An alternative to this change would be to rename the file to .md so that the file is covered by the existing *.md entry.