diff --git a/pelican/tests/TestPages/bad_page.rst b/pelican/tests/TestPages/bad_page.rst deleted file mode 100644 index bc62948b..00000000 --- a/pelican/tests/TestPages/bad_page.rst +++ /dev/null @@ -1,8 +0,0 @@ -This is a test bad page -####################### - -:status: invalid - -The quick brown fox jumped over the lazy dog's back. - -The status here is invalid, the page should not render. diff --git a/pelican/tests/TestPages/draft_page.rst b/pelican/tests/TestPages/draft_page.rst deleted file mode 100644 index 19ca0646..00000000 --- a/pelican/tests/TestPages/draft_page.rst +++ /dev/null @@ -1,8 +0,0 @@ -This is a test draft page -########################## - -:status: draft - -The quick brown fox . - -This page is a draft. diff --git a/pelican/tests/TestPages/draft_page_markdown.md b/pelican/tests/TestPages/draft_page_markdown.md deleted file mode 100644 index fda71868..00000000 --- a/pelican/tests/TestPages/draft_page_markdown.md +++ /dev/null @@ -1,12 +0,0 @@ -title: This is a markdown test draft page -status: draft - -Test Markdown File Header -========================= - -Used for pelican test ---------------------- - -The quick brown fox . - -This page is a draft \ No newline at end of file diff --git a/pelican/tests/TestPages/draft_page_with_template.rst b/pelican/tests/TestPages/draft_page_with_template.rst deleted file mode 100644 index 9d46e717..00000000 --- a/pelican/tests/TestPages/draft_page_with_template.rst +++ /dev/null @@ -1,11 +0,0 @@ -This is a test draft page with a custom template -################################################# - -:status: draft -:template: custom - -The quick brown fox . - -This page is a draft - -This page has a custom template to be called when rendered diff --git a/pelican/tests/TestPages/hidden_page.rst b/pelican/tests/TestPages/hidden_page.rst deleted file mode 100644 index 57ca329c..00000000 --- a/pelican/tests/TestPages/hidden_page.rst +++ /dev/null @@ -1,8 +0,0 @@ -This is a test hidden page -########################## - -:status: hidden - -The quick brown fox jumped over the lazy dog's back. - -This page is hidden diff --git a/pelican/tests/TestPages/hidden_page_markdown.md b/pelican/tests/TestPages/hidden_page_markdown.md deleted file mode 100644 index 1e532fe7..00000000 --- a/pelican/tests/TestPages/hidden_page_markdown.md +++ /dev/null @@ -1,12 +0,0 @@ -title: This is a markdown test hidden page -status: hidden - -Test Markdown File Header -========================= - -Used for pelican test ---------------------- - -The quick brown fox jumped over the lazy dog's back. - -This page is hidden diff --git a/pelican/tests/TestPages/hidden_page_with_template.rst b/pelican/tests/TestPages/hidden_page_with_template.rst deleted file mode 100644 index 36104a09..00000000 --- a/pelican/tests/TestPages/hidden_page_with_template.rst +++ /dev/null @@ -1,11 +0,0 @@ -This is a test hidden page with a custom template -################################################# - -:status: hidden -:template: custom - -The quick brown fox jumped over the lazy dog's back. - -This page is hidden - -This page has a custom template to be called when rendered diff --git a/pelican/tests/TestPages/page.rst b/pelican/tests/TestPages/page.rst deleted file mode 100644 index 2d13976d..00000000 --- a/pelican/tests/TestPages/page.rst +++ /dev/null @@ -1,4 +0,0 @@ -This is a test page -################### - -The quick brown fox jumped over the lazy dog's back. diff --git a/pelican/tests/TestPages/page_markdown.md b/pelican/tests/TestPages/page_markdown.md deleted file mode 100644 index d5416a6f..00000000 --- a/pelican/tests/TestPages/page_markdown.md +++ /dev/null @@ -1,9 +0,0 @@ -title: This is a markdown test page - -Test Markdown File Header -========================= - -Used for pelican test ---------------------- - -The quick brown fox jumped over the lazy dog's back. diff --git a/pelican/tests/TestPages/page_used_for_sorting_test.rst b/pelican/tests/TestPages/page_used_for_sorting_test.rst deleted file mode 100644 index 40cdc7ea..00000000 --- a/pelican/tests/TestPages/page_used_for_sorting_test.rst +++ /dev/null @@ -1,6 +0,0 @@ -A Page (Test) for sorting -######################### - -:slug: zzzz - -When using title, should be first. When using slug, should be last. diff --git a/pelican/tests/TestPages/page_with_category_and_tag_links.md b/pelican/tests/TestPages/page_with_category_and_tag_links.md deleted file mode 100644 index 6806a570..00000000 --- a/pelican/tests/TestPages/page_with_category_and_tag_links.md +++ /dev/null @@ -1,7 +0,0 @@ -Title: Page with a bunch of links - -My links: - -[Link 1]({tag}マック) - -[Link 2]({category}Yeah) diff --git a/pelican/tests/TestPages/page_with_static_links.md b/pelican/tests/TestPages/page_with_static_links.md deleted file mode 100644 index 1967cfcf..00000000 --- a/pelican/tests/TestPages/page_with_static_links.md +++ /dev/null @@ -1,7 +0,0 @@ -Title: Page with static links - -My links: - -[Link 0]({static}image0.jpg) - -[Link 1]({attach}image1.jpg) diff --git a/pelican/tests/TestPages/page_with_template.rst b/pelican/tests/TestPages/page_with_template.rst deleted file mode 100644 index 9388dc2f..00000000 --- a/pelican/tests/TestPages/page_with_template.rst +++ /dev/null @@ -1,8 +0,0 @@ -This is a test page with a preset template -########################################## - -:template: custom - -The quick brown fox jumped over the lazy dog's back. - -This article has a custom template to be called when rendered diff --git a/pelican/tests/__init__.py b/pelican/tests/__init__.py deleted file mode 100644 index 4605a02b..00000000 --- a/pelican/tests/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -import logging -import warnings - -from pelican.log import log_warnings - -# redirect warnings modulole to use logging instead -log_warnings() - -# setup warnings to log DeprecationWarning's and error on -# warnings in pelican's codebase -warnings.simplefilter("default", DeprecationWarning) -warnings.filterwarnings("error", ".*", Warning, "pelican") - -# Add a NullHandler to silence warning about no available handlers -logging.getLogger().addHandler(logging.NullHandler()) diff --git a/pelican/tests/content/2012-11-29_rst_w_filename_meta#foo-bar.rst b/pelican/tests/content/2012-11-29_rst_w_filename_meta#foo-bar.rst deleted file mode 100644 index 43f05a15..00000000 --- a/pelican/tests/content/2012-11-29_rst_w_filename_meta#foo-bar.rst +++ /dev/null @@ -1,6 +0,0 @@ - -Rst with filename metadata -########################## - -:category: yeah -:author: Alexis Métaireau diff --git a/pelican/tests/content/2012-11-30_md_w_filename_meta#foo-bar.md b/pelican/tests/content/2012-11-30_md_w_filename_meta#foo-bar.md deleted file mode 100644 index cdccfc8a..00000000 --- a/pelican/tests/content/2012-11-30_md_w_filename_meta#foo-bar.md +++ /dev/null @@ -1,6 +0,0 @@ -category: yeah -author: Alexis Métaireau - -Markdown with filename metadata -=============================== - diff --git a/pelican/tests/content/TestCategory/article_with_category.rst b/pelican/tests/content/TestCategory/article_with_category.rst deleted file mode 100644 index 69ffa98b..00000000 --- a/pelican/tests/content/TestCategory/article_with_category.rst +++ /dev/null @@ -1,7 +0,0 @@ -This is an article with category ! -################################## - -:category: yeah -:date: 1970-01-01 - -This article should be in 'yeah' category. diff --git a/pelican/tests/content/TestCategory/article_without_category.rst b/pelican/tests/content/TestCategory/article_without_category.rst deleted file mode 100644 index 4bc5d78d..00000000 --- a/pelican/tests/content/TestCategory/article_without_category.rst +++ /dev/null @@ -1,4 +0,0 @@ -This is an article without category ! -##################################### - -This article should be in 'TestCategory' category. diff --git a/pelican/tests/content/article.rst b/pelican/tests/content/article.rst deleted file mode 100644 index 793e6869..00000000 --- a/pelican/tests/content/article.rst +++ /dev/null @@ -1,6 +0,0 @@ -Article title -############# - -THIS is some content. With some stuff to "typogrify"... - -Now with added support for :abbr:`TLA (three letter acronym)`. diff --git a/pelican/tests/content/article_draft.md b/pelican/tests/content/article_draft.md deleted file mode 100644 index d2235553..00000000 --- a/pelican/tests/content/article_draft.md +++ /dev/null @@ -1,5 +0,0 @@ -Title: Draft article -Date: 2012-10-31 -Status: draft - -This is some content. diff --git a/pelican/tests/content/article_hidden.md b/pelican/tests/content/article_hidden.md deleted file mode 100644 index d449f701..00000000 --- a/pelican/tests/content/article_hidden.md +++ /dev/null @@ -1,5 +0,0 @@ -Title: Hidden article -Date: 2012-10-31 -Status: hidden - -This is some unlisted content. diff --git a/pelican/tests/content/article_with_attributes_containing_double_quotes.html b/pelican/tests/content/article_with_attributes_containing_double_quotes.html deleted file mode 100644 index 7daa5801..00000000 --- a/pelican/tests/content/article_with_attributes_containing_double_quotes.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Ensure that if an attribute value contains a double quote, it is - surrounded with single quotes, otherwise with double quotes. - Span content - Span content - Span content - - diff --git a/pelican/tests/content/article_with_capitalized_metadata.rst b/pelican/tests/content/article_with_capitalized_metadata.rst deleted file mode 100644 index 93ed5b15..00000000 --- a/pelican/tests/content/article_with_capitalized_metadata.rst +++ /dev/null @@ -1,16 +0,0 @@ - -This is a super article ! -######################### - -:TAGS: foo, bar, foobar -:DATE: 2010-12-02 10:14 -:MODIFIED: 2010-12-02 10:20 -:CATEGORY: yeah -:AUTHOR: Alexis Métaireau -:SUMMARY: - Multi-line metadata should be supported - as well as **inline markup** and stuff to "typogrify"... -:CUSTOM_FIELD: http://notmyidea.org -:CUSTOM_FORMATTED_FIELD: - Multi-line metadata should also be supported - as well as *inline markup* and stuff to "typogrify"... diff --git a/pelican/tests/content/article_with_code_block.rst b/pelican/tests/content/article_with_code_block.rst deleted file mode 100644 index 586878cf..00000000 --- a/pelican/tests/content/article_with_code_block.rst +++ /dev/null @@ -1,15 +0,0 @@ -An Article With Code Block To Test Typogrify Ignore -################################################### - -An article with some code - -.. code-block:: python - - x & y - -A block quote: - - x & y - -Normal: -x & y diff --git a/pelican/tests/content/article_with_comments.html b/pelican/tests/content/article_with_comments.html deleted file mode 100644 index 289e4a66..00000000 --- a/pelican/tests/content/article_with_comments.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - Body content - - - diff --git a/pelican/tests/content/article_with_duplicate_tags_authors.md b/pelican/tests/content/article_with_duplicate_tags_authors.md deleted file mode 100644 index 7ab046f9..00000000 --- a/pelican/tests/content/article_with_duplicate_tags_authors.md +++ /dev/null @@ -1,15 +0,0 @@ -Title: Test metadata duplicates -Category: test -Tags: foo, bar, foobar, foo, bar -Authors: Author, First; Author, Second; Author, First -Date: 2010-12-02 10:14 -Modified: 2010-12-02 10:20 -Summary: I have a lot to test - -Test Markdown File Header -========================= - -Used for pelican test ---------------------- - -The quick brown fox jumped over the lazy dog's back. diff --git a/pelican/tests/content/article_with_inline_svg.html b/pelican/tests/content/article_with_inline_svg.html deleted file mode 100644 index 07f97a8a..00000000 --- a/pelican/tests/content/article_with_inline_svg.html +++ /dev/null @@ -1,17 +0,0 @@ - - - Article with an inline SVG - - - Ensure that the title attribute in an inline svg is not handled as an HTML title. - - - A different title inside the inline SVG - - - - - - - - diff --git a/pelican/tests/content/article_with_keywords.html b/pelican/tests/content/article_with_keywords.html deleted file mode 100644 index 0744c754..00000000 --- a/pelican/tests/content/article_with_keywords.html +++ /dev/null @@ -1,6 +0,0 @@ - - - This is a super article ! - - - diff --git a/pelican/tests/content/article_with_markdown_and_footnote.md b/pelican/tests/content/article_with_markdown_and_footnote.md deleted file mode 100644 index 6fea2d6e..00000000 --- a/pelican/tests/content/article_with_markdown_and_footnote.md +++ /dev/null @@ -1,15 +0,0 @@ -Title: Article with markdown containing footnotes -Date: 2012-10-31 -Modified: 2012-11-01 -Summary: Summary with **inline** markup *should* be supported. -Multiline: Line Metadata should be handle properly. - See syntax of Meta-Data extension of Python Markdown package: - If a line is indented by 4 or more spaces, - that line is assumed to be an additional line of the value - for the previous keyword. - A keyword may have as many lines as desired. - -This is some content[^1] with some footnotes[^footnote] - -[^1]: Numbered footnote -[^footnote]: Named footnote diff --git a/pelican/tests/content/article_with_markdown_and_nested_metadata.md b/pelican/tests/content/article_with_markdown_and_nested_metadata.md deleted file mode 100644 index 3968027b..00000000 --- a/pelican/tests/content/article_with_markdown_and_nested_metadata.md +++ /dev/null @@ -1,5 +0,0 @@ -Title: Article with markdown and nested summary metadata -Date: 2012-10-30 -Summary: Test: This metadata value looks like metadata - -This is some content. diff --git a/pelican/tests/content/article_with_markdown_and_nonascii_summary.md b/pelican/tests/content/article_with_markdown_and_nonascii_summary.md deleted file mode 100644 index d76ed4a1..00000000 --- a/pelican/tests/content/article_with_markdown_and_nonascii_summary.md +++ /dev/null @@ -1,19 +0,0 @@ -Title: マックOS X 10.8でパイソンとVirtualenvをインストールと設定 -Slug: python-virtualenv-on-mac-osx-mountain-lion-10.8 -Date: 2012-12-20 -Modified: 2012-12-22 -Tags: パイソン, マック -Category: 指導書 -Summary: パイソンとVirtualenvをまっくでインストールする方法について明確に説明します。 - -Writing unicode is certainly fun. - -パイソンとVirtualenvをまっくでインストールする方法について明確に説明します。 - -And let's mix languages. - -первый пост - -Now another. - -İlk yazı çok özel değil. diff --git a/pelican/tests/content/article_with_markdown_and_summary_metadata_multi.md b/pelican/tests/content/article_with_markdown_and_summary_metadata_multi.md deleted file mode 100644 index c5f62a0a..00000000 --- a/pelican/tests/content/article_with_markdown_and_summary_metadata_multi.md +++ /dev/null @@ -1,10 +0,0 @@ -Title: Article with markdown and summary metadata multi -Date: 2012-10-31 -Summary: - A multi-line summary should be supported - as well as **inline markup**. -custom_formatted_field: - Multi-line metadata should also be supported - as well as *inline markup* and stuff to "typogrify"... - -This is some content. diff --git a/pelican/tests/content/article_with_markdown_and_summary_metadata_single.md b/pelican/tests/content/article_with_markdown_and_summary_metadata_single.md deleted file mode 100644 index a7d6f09b..00000000 --- a/pelican/tests/content/article_with_markdown_and_summary_metadata_single.md +++ /dev/null @@ -1,5 +0,0 @@ -Title: Article with markdown and summary metadata single -Date: 2012-10-30 -Summary: A single-line summary should be supported as well as **inline markup**. - -This is some content. diff --git a/pelican/tests/content/article_with_markdown_extension.markdown b/pelican/tests/content/article_with_markdown_extension.markdown deleted file mode 100644 index 94e92871..00000000 --- a/pelican/tests/content/article_with_markdown_extension.markdown +++ /dev/null @@ -1,10 +0,0 @@ -title: Test markdown File -category: test - -Test Markdown File Header -========================= - -Used for pelican test ---------------------- - -This is another markdown test file. Uses the markdown extension. diff --git a/pelican/tests/content/article_with_markdown_markup_extensions.md b/pelican/tests/content/article_with_markdown_markup_extensions.md deleted file mode 100644 index 6cf56403..00000000 --- a/pelican/tests/content/article_with_markdown_markup_extensions.md +++ /dev/null @@ -1,8 +0,0 @@ -Title: Test Markdown extensions - -[TOC] - -## Level1 - -### Level2 - diff --git a/pelican/tests/content/article_with_md_extension.md b/pelican/tests/content/article_with_md_extension.md deleted file mode 100644 index 89b6980c..00000000 --- a/pelican/tests/content/article_with_md_extension.md +++ /dev/null @@ -1,14 +0,0 @@ -Title: Test md File -Category: test -Tags: foo, bar, foobar -Date: 2010-12-02 10:14 -Modified: 2010-12-02 10:20 -Summary: I have a lot to test - -Test Markdown File Header -========================= - -Used for pelican test ---------------------- - -The quick brown fox jumped over the lazy dog's back. diff --git a/pelican/tests/content/article_with_mdown_extension.mdown b/pelican/tests/content/article_with_mdown_extension.mdown deleted file mode 100644 index bdaf74cd..00000000 --- a/pelican/tests/content/article_with_mdown_extension.mdown +++ /dev/null @@ -1,10 +0,0 @@ -title: Test mdown File -category: test - -Test Markdown File Header -========================= - -Used for pelican test ---------------------- - -This is another markdown test file. Uses the mdown extension. diff --git a/pelican/tests/content/article_with_metadata.html b/pelican/tests/content/article_with_metadata.html deleted file mode 100644 index b501ea29..00000000 --- a/pelican/tests/content/article_with_metadata.html +++ /dev/null @@ -1,15 +0,0 @@ - - - This is a super article ! - - - - - - - - - Multi-line metadata should be supported - as well as inline markup. - - diff --git a/pelican/tests/content/article_with_metadata.rst b/pelican/tests/content/article_with_metadata.rst deleted file mode 100644 index 5f3d77bc..00000000 --- a/pelican/tests/content/article_with_metadata.rst +++ /dev/null @@ -1,16 +0,0 @@ - -This is a super article ! -######################### - -:tags: foo, bar, foobar -:date: 2010-12-02 10:14 -:modified: 2010-12-02 10:20 -:category: yeah -:author: Alexis Métaireau -:summary: - Multi-line metadata should be supported - as well as **inline markup** and stuff to "typogrify"... -:custom_field: http://notmyidea.org -:custom_formatted_field: - Multi-line metadata should also be supported - as well as *inline markup* and stuff to "typogrify"... diff --git a/pelican/tests/content/article_with_metadata.unknownextension b/pelican/tests/content/article_with_metadata.unknownextension deleted file mode 100644 index d4bac1c0..00000000 --- a/pelican/tests/content/article_with_metadata.unknownextension +++ /dev/null @@ -1,12 +0,0 @@ - -This is a super article ! -######################### - -:tags: foo, bar, foobar -:date: 2010-12-02 10:14 -:category: yeah -:author: Alexis Métaireau -:summary: - Multi-line metadata should be supported - as well as **inline markup**. -:custom_field: http://notmyidea.org diff --git a/pelican/tests/content/article_with_metadata_and_contents.html b/pelican/tests/content/article_with_metadata_and_contents.html deleted file mode 100644 index b108ac8a..00000000 --- a/pelican/tests/content/article_with_metadata_and_contents.html +++ /dev/null @@ -1,15 +0,0 @@ - - - This is a super article ! - - - - - - - - - Multi-line metadata should be supported - as well as inline markup. - - diff --git a/pelican/tests/content/article_with_metadata_explicit_date_implicit_modified.html b/pelican/tests/content/article_with_metadata_explicit_date_implicit_modified.html deleted file mode 100644 index b501ea29..00000000 --- a/pelican/tests/content/article_with_metadata_explicit_date_implicit_modified.html +++ /dev/null @@ -1,15 +0,0 @@ - - - This is a super article ! - - - - - - - - - Multi-line metadata should be supported - as well as inline markup. - - diff --git a/pelican/tests/content/article_with_metadata_explicit_dates.html b/pelican/tests/content/article_with_metadata_explicit_dates.html deleted file mode 100644 index 1c74f40e..00000000 --- a/pelican/tests/content/article_with_metadata_explicit_dates.html +++ /dev/null @@ -1,16 +0,0 @@ - - - This is a super article ! - - - - - - - - - - Multi-line metadata should be supported - as well as inline markup. - - diff --git a/pelican/tests/content/article_with_metadata_implicit_date_explicit_modified.html b/pelican/tests/content/article_with_metadata_implicit_date_explicit_modified.html deleted file mode 100644 index 8cd2885b..00000000 --- a/pelican/tests/content/article_with_metadata_implicit_date_explicit_modified.html +++ /dev/null @@ -1,15 +0,0 @@ - - - This is a super article ! - - - - - - - - - Multi-line metadata should be supported - as well as inline markup. - - diff --git a/pelican/tests/content/article_with_metadata_implicit_dates.html b/pelican/tests/content/article_with_metadata_implicit_dates.html deleted file mode 100644 index 14d7e1e0..00000000 --- a/pelican/tests/content/article_with_metadata_implicit_dates.html +++ /dev/null @@ -1,14 +0,0 @@ - - - This is a super article ! - - - - - - - - Multi-line metadata should be supported - as well as inline markup. - - diff --git a/pelican/tests/content/article_with_mkd_extension.mkd b/pelican/tests/content/article_with_mkd_extension.mkd deleted file mode 100644 index c946cb87..00000000 --- a/pelican/tests/content/article_with_mkd_extension.mkd +++ /dev/null @@ -1,10 +0,0 @@ -title: Test mkd File -category: test - -Test Markdown File Header -========================= - -Used for pelican test ---------------------- - -This is another markdown test file. Uses the mkd extension. diff --git a/pelican/tests/content/article_with_multiple_authors.html b/pelican/tests/content/article_with_multiple_authors.html deleted file mode 100644 index a74442c9..00000000 --- a/pelican/tests/content/article_with_multiple_authors.html +++ /dev/null @@ -1,6 +0,0 @@ - - - This is an article with multiple authors! - - - diff --git a/pelican/tests/content/article_with_multiple_authors.rst b/pelican/tests/content/article_with_multiple_authors.rst deleted file mode 100644 index 04af017c..00000000 --- a/pelican/tests/content/article_with_multiple_authors.rst +++ /dev/null @@ -1,6 +0,0 @@ -This is an article with multiple authors! -######################################### - -:date: 2014-02-09 02:20 -:modified: 2014-02-09 02:20 -:authors: First Author, Second Author diff --git a/pelican/tests/content/article_with_multiple_authors_list.rst b/pelican/tests/content/article_with_multiple_authors_list.rst deleted file mode 100644 index 7da5fae2..00000000 --- a/pelican/tests/content/article_with_multiple_authors_list.rst +++ /dev/null @@ -1,10 +0,0 @@ -This is an article with multiple authors in list format! -######################################################## - -:date: 2014-02-09 02:20 -:modified: 2014-02-09 02:20 -:authors: - Author, First - - Author, Second - -The author names are in last,first form to verify that -they are not just getting split on commas. diff --git a/pelican/tests/content/article_with_multiple_authors_semicolon.rst b/pelican/tests/content/article_with_multiple_authors_semicolon.rst deleted file mode 100644 index fa76ac4e..00000000 --- a/pelican/tests/content/article_with_multiple_authors_semicolon.rst +++ /dev/null @@ -1,6 +0,0 @@ -This is an article with multiple authors in lastname, firstname format! -####################################################################### - -:date: 2014-02-09 02:20 -:modified: 2014-02-09 02:20 -:authors: Author, First; Author, Second diff --git a/pelican/tests/content/article_with_multiple_metadata_tags.html b/pelican/tests/content/article_with_multiple_metadata_tags.html deleted file mode 100644 index b52fbcf7..00000000 --- a/pelican/tests/content/article_with_multiple_metadata_tags.html +++ /dev/null @@ -1,11 +0,0 @@ - - - Metadata tags as list! - - - - - When custom metadata tags are specified more than once - they are collected into a list! - - diff --git a/pelican/tests/content/article_with_nonconformant_meta_tags.html b/pelican/tests/content/article_with_nonconformant_meta_tags.html deleted file mode 100644 index 5ed44bbd..00000000 --- a/pelican/tests/content/article_with_nonconformant_meta_tags.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - Article with Nonconformant HTML meta tags - - - - Multi-line metadata should be supported - as well as inline markup. - - diff --git a/pelican/tests/content/article_with_null_attributes.html b/pelican/tests/content/article_with_null_attributes.html deleted file mode 100644 index 68da704c..00000000 --- a/pelican/tests/content/article_with_null_attributes.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - Ensure that empty attributes are copied properly. - - - diff --git a/pelican/tests/content/article_with_template.rst b/pelican/tests/content/article_with_template.rst deleted file mode 100644 index eb55738c..00000000 --- a/pelican/tests/content/article_with_template.rst +++ /dev/null @@ -1,8 +0,0 @@ -Article with template -##################### - -:template: custom - -This article has a custom template to be called when rendered - -This is some content. With some stuff to "typogrify". diff --git a/pelican/tests/content/article_with_typogrify_dashes.md b/pelican/tests/content/article_with_typogrify_dashes.md deleted file mode 100644 index 2914b2df..00000000 --- a/pelican/tests/content/article_with_typogrify_dashes.md +++ /dev/null @@ -1,3 +0,0 @@ -Title: One -, two --, three --- dashes! - -One: -; Two: --; Three: --- diff --git a/pelican/tests/content/article_with_typogrify_dashes.rst b/pelican/tests/content/article_with_typogrify_dashes.rst deleted file mode 100644 index 90064c5d..00000000 --- a/pelican/tests/content/article_with_typogrify_dashes.rst +++ /dev/null @@ -1,4 +0,0 @@ -One -, two --, three --- dashes! -################################ - -One: -; Two: --; Three: --- diff --git a/pelican/tests/content/article_with_uppercase_metadata.html b/pelican/tests/content/article_with_uppercase_metadata.html deleted file mode 100644 index b4cedf39..00000000 --- a/pelican/tests/content/article_with_uppercase_metadata.html +++ /dev/null @@ -1,6 +0,0 @@ - - - This is a super article ! - - - diff --git a/pelican/tests/content/article_with_uppercase_metadata.rst b/pelican/tests/content/article_with_uppercase_metadata.rst deleted file mode 100644 index e26cdd13..00000000 --- a/pelican/tests/content/article_with_uppercase_metadata.rst +++ /dev/null @@ -1,6 +0,0 @@ - -This is a super article ! -######################### - -:Category: Yeah - diff --git a/pelican/tests/content/article_without_category.rst b/pelican/tests/content/article_without_category.rst deleted file mode 100644 index ff47f6ef..00000000 --- a/pelican/tests/content/article_without_category.rst +++ /dev/null @@ -1,6 +0,0 @@ - -This is an article without category ! -##################################### - -This article should be in the DEFAULT_CATEGORY. - diff --git a/pelican/tests/content/bad_extension.mmd b/pelican/tests/content/bad_extension.mmd deleted file mode 100644 index d282a749..00000000 --- a/pelican/tests/content/bad_extension.mmd +++ /dev/null @@ -1,3 +0,0 @@ -Title: Bad Extension - -This file shouldn't be included because its file extension is `.mmd`. diff --git a/pelican/tests/content/bloggerexport.xml b/pelican/tests/content/bloggerexport.xml deleted file mode 100644 index 4bc0985a..00000000 --- a/pelican/tests/content/bloggerexport.xml +++ /dev/null @@ -1,1067 +0,0 @@ - - - - tag:blogger.com,1999:blog-6303278419262689239.archive - - 2018-08-02T12:38:27.320-07:00 - - Notes of a Young Doctor - - - - - - Mikhail Afanasyevich Bulgakov - - https://www.blogger.com/profile/000082957 - - noreply@blogger.com - - - - Blogger - - - tag:blogger.com,1999:blog-6303278419262689239.layout - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Template: Notes of a Young Doctor - [Over 2000 lines of mostly css that we don't need here.] - - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_PUBLISHING_MODE - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Het type publicatie voor deze blog. - PUBLISH_MODE_BLOGSPOT - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_ADMIN_PERMISSION - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - De lijst van e-mails van beheerders voor de blog. - mikhail.afanasyevich.bulgakov@gmail.com - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_ADULT_CONTENT - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Hier wordt aangegeven of deze blog content voor volwassenen bevat - false - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_ALTERNATE_JSRENDER_ALLOWED - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Hier wordt aangegeven of alternatieve weergaven in JavaScript zijn toegestaan - true - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_ANALYTICS_ACCOUNT_NUMBER - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Google Analytics-accountnummer voor een blog - - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_ARCHIVE_DATE_FORMAT - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Het getal van de datumnotatie voor de archiefindex - 9 - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_ARCHIVE_FREQUENCY - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Hoe vaak deze blog moet worden gearchiveerd - MONTHLY - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_AUTHOR_PERMISSION - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - De lijst van e-mails van auteurs die toestemming hebben om te publiceren. - - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_BACKLINKS_ALLOWED - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Hier wordt aangegeven of reactiebacklinks op de blog moeten worden getoond - false - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_BY_POST_ARCHIVING - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Hier wordt aangegeven of iedere post moet worden voorzien van een archiefpagina - true - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_COMMENT_ACCESS - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Wie kan reacties achterlaten - BLOGGERS - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_COMMENT_CAPTCHA - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Hier wordt aangegeven of personen die reacties geven, een Captcha (woordverificatie) moeten invullen - true - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_COMMENT_EMAIL - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Lijst met e-mailadressen om meldingen van nieuwe reacties naar te sturen - mikhail.afanasyevich.bulgakov@gmail.com - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_COMMENT_FEED - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Het type feed dat voor blogreacties moet worden gegeven - FULL - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_COMMENT_FORM_LOCATION - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Locatie van formulier voor blogreacties - EMBEDDED_IFRAME - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_COMMENT_MESSAGE - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Bericht bij blogreactie - - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_COMMENT_MODERATION - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Hier wordt aangegeven of het modereren van reacties moet worden ingeschakeld - DISABLED - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_COMMENT_MODERATION_DELAY - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Aantal dagen waarna nieuwe reacties in aanmerking komen voor moderaten - 14 - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_COMMENT_MODERATION_EMAIL - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - E-mailadres waar meldingen binnenkomen over welke nieuwe reacties bewerkt of verwijderd moeten worden - - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_COMMENT_PROFILE_IMAGES - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Hier wordt aangegeven of profielafbeeldingen in reacties moeten worden getoond - true - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_COMMENTS_ALLOWED - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Hier wordt aangegeven of er reacties moeten worden weergegeven - true - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_COMMENTS_TIME_STAMP_FORMAT - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Getal van de tijdstempelnotatie voor reacties - 29 - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_CONVERT_LINE_BREAKS - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Hier wordt aangegeven of de regelscheidingen moeten worden omgezet in <br />-tags in de posteditor - true - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_CUSTOM_ADS_TXT - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - De aangepaste ads.txt-content van de blog die aan advertentiezoekmachines wordt getoond. - - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_CUSTOM_ADS_TXT_ENABLED - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Bepaalt of deze blog aangepaste ads.txt-content aan advertentiezoekmachines toont. - false - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_CUSTOM_PAGE_NOT_FOUND - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - De content die wordt weergegeven wanneer een post of pagina niet is gevonden. - - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_CUSTOM_ROBOTS_TXT - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - De aangepaste robots.txt-content van de blog wordt aan zoekmachines getoond. - - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_CUSTOM_ROBOTS_TXT_ENABLED - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Bepaalt of deze blog aangepaste robots.txt-content aan zoekmachines toont. - false - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_DATE_FORMAT - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Het getal van de datumnotatie voor koppen - 26 - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_DEFAULT_BACKLINKS_MODE - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Standaardbacklinks voor posts - DEFAULT_HAVE_BACKLINKS - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_DEFAULT_COMMENTS_MODE - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Standaardreactie voor posts - DEFAULT_HAVE_COMMENTS - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_DESCRIPTION - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Een beschrijving van de blog - - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_EMAIL_POST_LINKS - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Hier wordt aangegeven of er een link moet worden weergegeven waarmee gebruikers posts kunnen e-mailen - true - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_FEED_REDIRECT_URL - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - URL waar verzoeken om postfeed naartoe worden geleid - - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_FLOAT_ALIGNMENT - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Hier wordt aangegeven of zwevende uitlijning is ingeschakeld voor de blog - true - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_LOCALE - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Taal voor deze blog - nl - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_M2B_WHITELIST_EMAIL - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Lijst met e-mailadressen die via e-mail posts op de blog kunnen plaatsen. - - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_MAX_NUM - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Maximaal aantal items voor weergave op de hoofdpagina" - 100 - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_MAX_UNIT - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Eenheid van items voor weergave op de hoofdpagina - POSTS - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_META_DESCRIPTION - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - De metabeschrijving van de blog die wordt gebruikt door zoekmachines. - - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_META_DESCRIPTION_ENABLED - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Of deze blog wordt weergegeven met metabeschrijvingen. - false - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_NAME - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - De naam van de blog - Notes of a Young Doctor - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_PER_POST_FEED - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Het type feed dat voor reacties op afzonderlijke posts moet worden gegeven - FULL - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_POST_FEED - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Het type feed dat voor blogposts moet worden gegeven - FULL - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_POST_FEED_FOOTER - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Voettekst om aan het einde van iedere vermelding in de postfeed toe te voegen - - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_POST_TEMPLATE - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - De template voor blogposts - - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_PROMOTED - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Hier wordt aangegeven of deze blog op Blogger kan worden aangeprezen - true - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_QUICK_EDITING - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Hier wordt aangegeven of Snel bewerken is ingeschakeld - true - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_READ_ACCESS_MODE - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Het type toegang voor de lezers van de blog. - PUBLIC - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_READER_PERMISSION - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - De e-maillijst voor gebruikers die toestemming hebben om de blog te lezen. - - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_SEARCHABLE - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Hier wordt aangegeven of deze blog door zoekmachines moet worden geïndexeerd - true - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_SEND_EMAIL - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Door komma's gescheiden lijst met e-mailadressen om nieuwe blogposts naar te sturen - - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_SHOW_TITLE - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Hier wordt aangegeven of het titelveld moet worden weergegeven - true - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_SHOW_URL - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Hier wordt aangegeven of er een verwante link in de postopsteller moet worden weergegeven - false - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_SUBDOMAIN - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Het subdomein van BlogSpot om je blog op te publiceren - youngdoctornotes - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_TIME_STAMP_FORMAT - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Het getal van de tijdstempelnotatie - 27 - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_TIME_ZONE - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - De tijdzone voor deze blog - America/Los_Angeles - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.settings.BLOG_USE_LIGHTBOX - 2010-11-27T07:08:20.877-08:00 - 2018-08-02T12:38:27.320-07:00 - - Of afbeeldingen worden weergegeven in de lightbox wanneer erop wordt geklikt - true - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.post-1276418104709695660 - 2010-11-27T08:21:00.000-08:00 - 2018-08-02T12:22:48.286-07:00 - - yes - - - - - Black as Egypt's Night - Write next story here - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - 0 - - - tag:blogger.com,1999:blog-6303278419262689239.post-1858599377741856733 - 2010-11-27T07:12:00.000-08:00 - 2010-11-27T07:56:43.964-08:00 - - The Steel Windpipe - It was a cold Winter's night.<br /><br /><ul><li>Very cold indeed.</li><br /><li>Note to self: pad out ending</li></ul> - - - - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - 1 - - - tag:blogger.com,1999:blog-6303278419262689239.page-4386962582497458967 - 2018-08-02T12:38:00.001-07:00 - 2018-08-02T12:38:27.171-07:00 - - yes - - - Test page 2 - <div dir="ltr" style="text-align: left;" trbidi="on">This is a second test</div> - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.page-1406163839769953231 - 2018-08-02T12:37:00.004-07:00 - 2018-08-02T12:37:47.424-07:00 - - Test page - <div dir="ltr" style="text-align: left;" trbidi="on">This is a test.</div> - - - - - Mikhail Afanasyevich Bulgakov - https://www.blogger.com/profile/000082957 - noreply@blogger.com - - - - - tag:blogger.com,1999:blog-6303278419262689239.post-5590533389087749201 - 2010-11-29T12:35:44.027-08:00 - 2010-11-29T12:35:44.027-08:00 - - Mishka, always a pleasure to read your adventures!... - Mishka, always a pleasure to read your adventures!<br /><br />It's a shame you don't get more time for writing. - - - - - Thomas Isidore Noël Sankara - https://www.blogger.com/profile/0617349827 - noreply@blogger.com - - - - - - - \ No newline at end of file diff --git a/pelican/tests/content/empty.md b/pelican/tests/content/empty.md deleted file mode 100644 index e69de29b..00000000 diff --git a/pelican/tests/content/empty_with_bom.md b/pelican/tests/content/empty_with_bom.md deleted file mode 100644 index 5f282702..00000000 --- a/pelican/tests/content/empty_with_bom.md +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/pelican/tests/content/wordpress_content_decoded b/pelican/tests/content/wordpress_content_decoded deleted file mode 100644 index 6e91338c..00000000 --- a/pelican/tests/content/wordpress_content_decoded +++ /dev/null @@ -1,48 +0,0 @@ -

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

-

-

-Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

-

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

- -
-
-  a = [1, 2, 3]
-  b = [4, 5, 6]
-  for i in zip(a, b):
-    print i
-
-
-

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

diff --git a/pelican/tests/content/wordpress_content_encoded b/pelican/tests/content/wordpress_content_encoded deleted file mode 100644 index da35de3b..00000000 --- a/pelican/tests/content/wordpress_content_encoded +++ /dev/null @@ -1,55 +0,0 @@ -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - - - -
-Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -
- - -
-
-  a = [1, 2, 3]
-  b = [4, 5, 6]
-  for i in zip(a, b):
-    print i
-
-
- -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - diff --git a/pelican/tests/content/wordpressexport.xml b/pelican/tests/content/wordpressexport.xml deleted file mode 100644 index 9b194e8f..00000000 --- a/pelican/tests/content/wordpressexport.xml +++ /dev/null @@ -1,957 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - Pelican test channel - http://thisisa.test - Not a real feed, just for test - Sun, 13 May 2012 01:13:52 +0000 - en - 1.1 - http://thisisa.test - http://thisisa.test - - 2Bobbob@thisisa.test - 3Jonhjonh@thisisa.test - - 7categ-1 - 11categ-2 - 1uncategorized - 15categ-3 - 25tag-1 - 122tag2 - 68tag-3 - - http://wordpress.org/?v=3.3.1 - - - Empty post - http://thisisa.test/?attachment_id=24 - Sat, 04 Feb 2012 03:17:33 +0000 - bob - https://upload.wikimedia.org/wikipedia/commons/thumb/2/2c/Pelican_lakes_entrance02.jpg/240px-Pelican_lakes_entrance02.jpg - - - - 24 - 2012-02-04 03:17:33 - 2012-02-04 03:17:33 - open - open - empty-post - inherit - 0 - 0 - attachment - - 0 - https://upload.wikimedia.org/wikipedia/commons/thumb/2/2c/Pelican_lakes_entrance02.jpg/240px-Pelican_lakes_entrance02.jpg - - _wp_attachment_metadata - - - - _wp_attached_file - - - - _wp_attachment_image_alt - - - - - - http://thisisa.test/?p=168 - Thu, 01 Jan 1970 00:00:00 +0000 - bob - http://thisisa.test/?p=168 - - - - 168 - 2012-02-15 21:23:57 - 0000-00-00 00:00:00 - open - open - - draft - 0 - 0 - post - - 0 - - - _edit_last - - - - - A normal post - http://thisisa.test/?p=174 - Thu, 01 Jan 1970 00:00:00 +0000 - bob - http://thisisa.test/?p=174 - - -
  • Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  • -
  • Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  • - - -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum.]]>
    - - 174 - 2012-02-16 15:52:55 - 0000-00-00 00:00:00 - open - open - - draft - 0 - 0 - post - - 0 - - - _edit_last - - -
    - - Complete draft - http://thisisa.test/?p=176 - Thu, 01 Jan 1970 00:00:00 +0000 - bob - http://thisisa.test/?p=176 - - - - 176 - 2012-02-17 15:11:55 - 0000-00-00 00:00:00 - open - open - - draft - 0 - 0 - post - - 0 - - - _edit_last - - - - - Page - http://thisisa.test/contact/ - Wed, 11 Apr 2012 11:38:08 +0000 - bob - http://thisisa.test/?page_id=334 - - - - 334 - 2012-04-11 06:38:08 - 2012-04-11 11:38:08 - open - open - contact - publish - 0 - 0 - page - - 0 - - sharing_disabled - - - - _wp_page_template - - - - _edit_last - - - - - Empty Page - http://thisisa.test/empty/ - Wed, 11 Apr 2012 11:38:08 +0000 - bob - http://thisisa.test/?page_id=334 - - - - 334 - 2012-04-11 06:38:08 - 2012-04-11 11:38:08 - open - open - empty - publish - 0 - 0 - page - - 0 - - sharing_disabled - - - - _wp_page_template - - - - _edit_last - - - - - Special chars: l'é - http://thisisa.test/?p=471 - Thu, 01 Jan 1970 00:00:00 +0000 - bob - http://thisisa.test/?p=471 - - - - 471 - 2012-04-29 09:44:27 - 0000-00-00 00:00:00 - open - open - - draft - 0 - 0 - post - - 0 - - - _edit_last - - - - - - With excerpt - http://thisisa.test/with-excerpt/ - Sat, 04 Feb 2012 02:03:06 +0000 - bob - http://thisisa.test/?p=8 - - - - 8 - 2012-02-04 02:03:06 - 2012-02-04 02:03:06 - open - open - with-excerpt - publish - 0 - 0 - post - - 0 - - - - - _edit_last - - - - et_bigpost - - - - _thumbnail_id - - - - - With tags - http://thisisa.test/tags/ - Sat, 04 Feb 2012 21:05:25 +0000 - bob - http://thisisa.test/?p=25 - - - - 25 - 2012-02-04 21:05:25 - 2012-02-04 21:05:25 - open - open - with-tags - publish - 0 - 0 - post - - 0 - - - - - - _edit_last - - - - et_bigpost - - - - _thumbnail_id - - - - - With comments - http://thisisa.test/with-comments/ - Wed, 18 Apr 2012 08:36:26 +0000 - john - http://thisisa.test/?p=422 - - - - 422 - 2012-04-18 03:36:26 - 2012-04-18 08:36:26 - open - open - with-comments - publish - 0 - 0 - post - - 0 - - - _edit_last - - - - _thumbnail_id - - - - 116 - - User2@mail.test - - 127.0.0.1 - 2012-05-06 15:46:06 - 2012-05-06 20:46:06 - - 1 - - 0 - 0 - - akismet_result - - - - akismet_history - - - - akismet_as_submitted - - - - - 117 - - bob@thisisa.test - - 127.0.0.1 - 2012-05-06 17:44:06 - 2012-05-06 22:44:06 - - 1 - - 116 - 3 - - akismet_result - - - - akismet_history - - - - akismet_as_submitted - - - - - 156 - - - http://thisisa.test/to-article-you-ping-back/ - 127.0.0.1 - 2012-05-09 19:30:19 - 2012-05-10 00:30:19 - - trash - pingback - 0 - 0 - - akismet_history - - - - _wp_trash_meta_status - - - - _wp_trash_meta_time - - - - - 122 - - bob@thisisa.test - - 127.0.0.1 - 2012-05-07 14:11:34 - 2012-05-07 19:11:34 - - 1 - - 121 - 3 - - akismet_result - - - - akismet_history - - - - akismet_as_submitted - - - - - - Post with raw data - http://thisisa.test/?p=173 - Thu, 01 Jan 1970 00:00:00 +0000 - bob - http://thisisa.test/?p=173 - - Pelicans are scary - -Pelicans are supposed to eat fish, damn it! - - - -Bottom line: don't mess up with birds - -"That's a 'wonderful' shoe." - -“That’s a ‘magic’ sock.”]]> - - 173 - 2012-02-16 15:52:55 - 0000-00-00 00:00:00 - open - open - post-with-raw-data - publish - 0 - 0 - post - - 0 - - - _edit_last - - - - - A normal post with some <html> entities in the title. You can't miss them. - http://thisisa.test/?p=175 - Thu, 01 Jan 1970 00:00:00 +0000 - bob - http://thisisa.test/?p=175 - - -
  • Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  • -
  • Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  • - - -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum.]]>
    - - 175 - 2012-02-16 15:52:55 - 0000-00-00 00:00:00 - open - open - html-entity-test - publish - 0 - 0 - post - - 0 - - - _edit_last - - -
    - - Code in List - http://thisisa.test/?p=175 - Thu, 01 Jan 1970 00:00:00 +0000 - bob - http://thisisa.test/?p=175 - - -
  • List Item One!
  • -
  • List Item Two!
  • -
  • This is a code sample -
    -
    -  a = [1, 2, 3]
    -  b = [4, 5, 6]
    -  for i in zip(a, b):
    -    print i
    -
    -
  • -
  • List Item Four!
  • - - -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum.]]>
    - - 175 - 2012-02-16 15:52:55 - 0000-00-00 00:00:00 - open - open - code-in-list-test - publish - 0 - 0 - post - - 0 - - - _edit_last - - -
    - - A custom post in category 4 - http://thisisa.test/?p=175 - Thu, 01 Jan 1970 00:00:00 +0000 - bob - http://thisisa.test/?p=175 - - -
  • Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  • -
  • Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  • - - -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum.]]>
    - - 175 - 2012-02-16 15:52:55 - 0000-00-00 00:00:00 - open - open - custpost1cat4 - publish - 0 - 0 - custom1 - - 0 - - - _edit_last - - -
    - - A custom post in category 5 - http://thisisa.test/?p=176 - Thu, 01 Jan 1970 00:00:00 +0000 - bob - http://thisisa.test/?p=176 - - -
  • Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  • -
  • Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  • - - -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum.]]>
    - - 176 - 2012-02-16 15:52:55 - 0000-00-00 00:00:00 - open - open - custpost1cat5 - publish - 0 - 0 - custom1 - - 0 - - - _edit_last - - -
    - - A 2nd custom post type also in category 5 - http://thisisa.test/?p=177 - Thu, 01 Jan 1970 00:00:00 +0000 - bob - http://thisisa.test/?p=177 - - -
  • Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  • -
  • Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  • - - -Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod -tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo -consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse -cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum.]]>
    - - 177 - 2012-02-16 15:52:55 - 0000-00-00 00:00:00 - open - open - custpost2cat5 - publish - 0 - 0 - custom2 - - 0 - - - _edit_last - - -
    - - Attachment with a parent - http://thisisa.test/?attachment_id=24 - Sat, 04 Feb 2012 03:17:33 +0000 - bob - http://thisurlisinvalid.notarealdomain/not_an_image.jpg - - - - 25 - 2012-02-04 03:17:33 - 2012-02-04 03:17:33 - open - open - attachment-with-a-parent - inherit - 8 - 0 - attachment - - 0 - http://thisurlisinvalid.notarealdomain/not_an_image.jpg - - _wp_attachment_metadata - - - - _wp_attached_file - - - - _wp_attachment_image_alt - - - - - 2nd Attachment to same parent - http://thisisa.test/?attachment_id=25 - Sat, 04 Feb 2012 03:17:33 +0000 - bob - http://en.wikipedia.org/wiki/File:Pelikan_Walvis_Bay.jpg - - - - 25 - 2012-02-04 03:17:33 - 2012-02-04 03:17:33 - open - open - 2nd[attachment-to-same-parent - inherit - 8 - 0 - attachment - - 0 - http://en.wikipedia.org/wiki/File:Pelikan_Walvis_Bay.jpg - - _wp_attachment_metadata - - - - _wp_attached_file - - - - _wp_attachment_image_alt - - - - - Attachment with a different parent - http://thisisa.test/?attachment_id=26 - Sat, 04 Feb 2012 03:17:33 +0000 - bob - http://thisurlisinvalid.notarealdomain - - - - 25 - 2012-02-04 03:17:33 - 2012-02-04 03:17:33 - open - open - attachment-with-a-different-parent - inherit - 25 - 0 - attachment - - 0 - http://thisurlisinvalid.notarealdomain - - _wp_attachment_metadata - - - - _wp_attached_file - - - - _wp_attachment_image_alt - - - -
    -
    diff --git a/pelican/tests/cyclic_intersite_links/first-article.rst b/pelican/tests/cyclic_intersite_links/first-article.rst deleted file mode 100644 index b9eb3f93..00000000 --- a/pelican/tests/cyclic_intersite_links/first-article.rst +++ /dev/null @@ -1,7 +0,0 @@ -First article -############# - -:date: 2018-11-10 -:summary: Here's the `second <{filename}/second-article.rst>`_, - `third <{filename}/third-article.rst>`_ and a - `nonexistent article <{filename}/nonexistent.rst>`_. diff --git a/pelican/tests/cyclic_intersite_links/second-article.rst b/pelican/tests/cyclic_intersite_links/second-article.rst deleted file mode 100644 index acb87d47..00000000 --- a/pelican/tests/cyclic_intersite_links/second-article.rst +++ /dev/null @@ -1,7 +0,0 @@ -Second article -############## - -:date: 2018-11-10 -:summary: Here's the `first <{filename}/first-article.rst>`_, - `third <{filename}/third-article.rst>`_ and a - `nonexistent article <{filename}/nonexistent.rst>`_. diff --git a/pelican/tests/cyclic_intersite_links/third-article.rst b/pelican/tests/cyclic_intersite_links/third-article.rst deleted file mode 100644 index 4c7c1b76..00000000 --- a/pelican/tests/cyclic_intersite_links/third-article.rst +++ /dev/null @@ -1,7 +0,0 @@ -Third article -############# - -:date: 2018-11-10 -:summary: Here's the `first <{filename}/first-article.rst>`_, - `second <{filename}/second-article.rst>`_ and a - `nonexistent article <{filename}/nonexistent.rst>`_. diff --git a/pelican/tests/default_conf.py b/pelican/tests/default_conf.py deleted file mode 100644 index 99f3b6cf..00000000 --- a/pelican/tests/default_conf.py +++ /dev/null @@ -1,44 +0,0 @@ -AUTHOR = 'Alexis Métaireau' -SITENAME = "Alexis' log" -SITEURL = 'http://blog.notmyidea.org' -TIMEZONE = 'UTC' - -GITHUB_URL = 'http://github.com/ametaireau/' -DISQUS_SITENAME = "blog-notmyidea" -PDF_GENERATOR = False -REVERSE_CATEGORY_ORDER = True -DEFAULT_PAGINATION = 2 - -FEED_RSS = 'feeds/all.rss.xml' -CATEGORY_FEED_RSS = 'feeds/{slug}.rss.xml' - -LINKS = (('Biologeek', 'http://biologeek.org'), - ('Filyb', "http://filyb.info/"), - ('Libert-fr', "http://www.libert-fr.com"), - ('N1k0', "http://prendreuncafe.com/blog/"), - ('Tarek Ziadé', "http://ziade.org/blog"), - ('Zubin Mithra', "http://zubin71.wordpress.com/"),) - -SOCIAL = (('twitter', 'http://twitter.com/ametaireau'), - ('lastfm', 'http://lastfm.com/user/akounet'), - ('github', 'http://github.com/ametaireau'),) - -# global metadata to all the contents -DEFAULT_METADATA = {'yeah': 'it is'} - -# path-specific metadata -EXTRA_PATH_METADATA = { - 'extra/robots.txt': {'path': 'robots.txt'}, -} - -# static paths will be copied without parsing their contents -STATIC_PATHS = [ - 'pictures', - 'extra/robots.txt', -] - -FORMATTED_FIELDS = ['summary', 'custom_formatted_field'] - -# foobar will not be used, because it's not in caps. All configuration keys -# have to be in caps -foobar = "barbaz" diff --git a/pelican/tests/dummy_plugins/namespace_plugin/pelican/plugins/ns_plugin/__init__.py b/pelican/tests/dummy_plugins/namespace_plugin/pelican/plugins/ns_plugin/__init__.py deleted file mode 100644 index c514861d..00000000 --- a/pelican/tests/dummy_plugins/namespace_plugin/pelican/plugins/ns_plugin/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -NAME = 'namespace plugin' - - -def register(): - pass diff --git a/pelican/tests/dummy_plugins/normal_plugin/normal_plugin/__init__.py b/pelican/tests/dummy_plugins/normal_plugin/normal_plugin/__init__.py deleted file mode 100644 index e714c7a6..00000000 --- a/pelican/tests/dummy_plugins/normal_plugin/normal_plugin/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -from .submodule import noop # noqa: F401 - - -def register(): - pass diff --git a/pelican/tests/dummy_plugins/normal_plugin/normal_plugin/submodule.py b/pelican/tests/dummy_plugins/normal_plugin/normal_plugin/submodule.py deleted file mode 100644 index ba9c8f94..00000000 --- a/pelican/tests/dummy_plugins/normal_plugin/normal_plugin/submodule.py +++ /dev/null @@ -1,2 +0,0 @@ -def noop(): - pass diff --git a/pelican/tests/dummy_plugins/normal_plugin/normal_submodule_plugin/__init__.py b/pelican/tests/dummy_plugins/normal_plugin/normal_submodule_plugin/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/pelican/tests/dummy_plugins/normal_plugin/normal_submodule_plugin/subpackage/__init__.py b/pelican/tests/dummy_plugins/normal_plugin/normal_submodule_plugin/subpackage/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/pelican/tests/dummy_plugins/normal_plugin/normal_submodule_plugin/subpackage/subpackage.py b/pelican/tests/dummy_plugins/normal_plugin/normal_submodule_plugin/subpackage/subpackage.py deleted file mode 100644 index 9e12b19f..00000000 --- a/pelican/tests/dummy_plugins/normal_plugin/normal_submodule_plugin/subpackage/subpackage.py +++ /dev/null @@ -1,2 +0,0 @@ -def register(): - pass diff --git a/pelican/tests/dummy_plugins/normal_plugin/normal_submodule_plugin/subplugin.py b/pelican/tests/dummy_plugins/normal_plugin/normal_submodule_plugin/subplugin.py deleted file mode 100644 index 9e12b19f..00000000 --- a/pelican/tests/dummy_plugins/normal_plugin/normal_submodule_plugin/subplugin.py +++ /dev/null @@ -1,2 +0,0 @@ -def register(): - pass diff --git a/pelican/tests/mixed_content/fake_image.jpg b/pelican/tests/mixed_content/fake_image.jpg deleted file mode 100644 index e69de29b..00000000 diff --git a/pelican/tests/mixed_content/short_page.md b/pelican/tests/mixed_content/short_page.md deleted file mode 100644 index 46ca45ac..00000000 --- a/pelican/tests/mixed_content/short_page.md +++ /dev/null @@ -1,3 +0,0 @@ -Title: Short Page - -This is a page with little text. diff --git a/pelican/tests/mixed_content/subdir/subdir_fake_image.jpg b/pelican/tests/mixed_content/subdir/subdir_fake_image.jpg deleted file mode 100644 index e69de29b..00000000 diff --git a/pelican/tests/nested_content/maindir/maindir.md b/pelican/tests/nested_content/maindir/maindir.md deleted file mode 100644 index 443e1827..00000000 --- a/pelican/tests/nested_content/maindir/maindir.md +++ /dev/null @@ -1,3 +0,0 @@ -Title: Main Dir Page - -This page lives in maindir. diff --git a/pelican/tests/nested_content/maindir/subdir/subdir.md b/pelican/tests/nested_content/maindir/subdir/subdir.md deleted file mode 100644 index 32e73617..00000000 --- a/pelican/tests/nested_content/maindir/subdir/subdir.md +++ /dev/null @@ -1,3 +0,0 @@ -Title: Subdir Page - -This page lives in maindir/subdir. diff --git a/pelican/tests/output/basic/a-markdown-powered-article.html b/pelican/tests/output/basic/a-markdown-powered-article.html deleted file mode 100644 index 894fb8c9..00000000 --- a/pelican/tests/output/basic/a-markdown-powered-article.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - A markdown powered article - - - - - - - -
    -
    -
    -

    - A markdown powered article

    -
    - -
    -
    - - Published: Wed 20 April 2011 - - -

    In cat1.

    - -

    You're mutually oblivious.

    -

    a root-relative link to unbelievable -a file-relative link to unbelievable

    -
    - -
    -
    -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/archives.html b/pelican/tests/output/basic/archives.html deleted file mode 100644 index 27cbb73e..00000000 --- a/pelican/tests/output/basic/archives.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - A Pelican Blog - - - - - - -
    -

    Archives for A Pelican Blog

    - -
    -
    Fri 30 November 2012
    -
    FILENAME_METADATA example
    -
    Wed 29 February 2012
    -
    Second article
    -
    Wed 20 April 2011
    -
    A markdown powered article
    -
    Thu 17 February 2011
    -
    Article 1
    -
    Thu 17 February 2011
    -
    Article 2
    -
    Thu 17 February 2011
    -
    Article 3
    -
    Thu 02 December 2010
    -
    This is a super article !
    -
    Wed 20 October 2010
    -
    Oh yeah !
    -
    Fri 15 October 2010
    -
    Unbelievable !
    -
    Sun 14 March 2010
    -
    The baz tag
    -
    -
    -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/article-1.html b/pelican/tests/output/basic/article-1.html deleted file mode 100644 index 5e1196b7..00000000 --- a/pelican/tests/output/basic/article-1.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - Article 1 - - - - - - - -
    -
    -
    -

    - Article 1

    -
    - -
    -
    - - Published: Thu 17 February 2011 - - -

    In cat1.

    - -

    Article 1

    - -
    - -
    -
    -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/article-2.html b/pelican/tests/output/basic/article-2.html deleted file mode 100644 index 7dab6907..00000000 --- a/pelican/tests/output/basic/article-2.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - Article 2 - - - - - - - -
    -
    -
    -

    - Article 2

    -
    - -
    -
    - - Published: Thu 17 February 2011 - - -

    In cat1.

    - -

    Article 2

    - -
    - -
    -
    -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/article-3.html b/pelican/tests/output/basic/article-3.html deleted file mode 100644 index ba934652..00000000 --- a/pelican/tests/output/basic/article-3.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - Article 3 - - - - - - - -
    -
    -
    -

    - Article 3

    -
    - -
    -
    - - Published: Thu 17 February 2011 - - -

    In cat1.

    - -

    Article 3

    - -
    - -
    -
    -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/author/alexis-metaireau.html b/pelican/tests/output/basic/author/alexis-metaireau.html deleted file mode 100644 index a4d7a279..00000000 --- a/pelican/tests/output/basic/author/alexis-metaireau.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - A Pelican Blog - Alexis Métaireau - - - - - - - - -
    -

    Other articles

    -
    -
      - -
    1. -
      -

      Oh yeah !

      -
      - -
      -
      -

      Why not ?

      -

      After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !

      -alternate text -
      - - read more -
      -
    2. -
    -
    -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/authors.html b/pelican/tests/output/basic/authors.html deleted file mode 100644 index f062ccf6..00000000 --- a/pelican/tests/output/basic/authors.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - A Pelican Blog - Authors - - - - - - - -
    -

    Authors on A Pelican Blog

    - -
    - -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/categories.html b/pelican/tests/output/basic/categories.html deleted file mode 100644 index e9d981c8..00000000 --- a/pelican/tests/output/basic/categories.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - A Pelican Blog - Categories - - - - - - -

    Categories on A Pelican Blog

    - -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/category/bar.html b/pelican/tests/output/basic/category/bar.html deleted file mode 100644 index 7e272b78..00000000 --- a/pelican/tests/output/basic/category/bar.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - A Pelican Blog - bar - - - - - - - - -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/category/cat1.html b/pelican/tests/output/basic/category/cat1.html deleted file mode 100644 index eccf5587..00000000 --- a/pelican/tests/output/basic/category/cat1.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - A Pelican Blog - cat1 - - - - - - - - -
    -

    Other articles

    -
    -
      - -
    1. - -
    2. - -
    3. -
    -
    -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/category/misc.html b/pelican/tests/output/basic/category/misc.html deleted file mode 100644 index 119f5931..00000000 --- a/pelican/tests/output/basic/category/misc.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - A Pelican Blog - misc - - - - - - - - -
    -

    Other articles

    -
    -
      - -
    1. - -
    2. - -
    3. -
      -

      The baz tag

      -
      - -
      -
      - - Published: Sun 14 March 2010 - - -

      In misc.

      - -

      This article overrides the listening of the articles under the baz tag.

      - - read more -
      -
    4. -
    -
    -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/category/yeah.html b/pelican/tests/output/basic/category/yeah.html deleted file mode 100644 index 31a95629..00000000 --- a/pelican/tests/output/basic/category/yeah.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - A Pelican Blog - yeah - - - - - - - - -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/drafts/a-draft-article-without-date.html b/pelican/tests/output/basic/drafts/a-draft-article-without-date.html deleted file mode 100644 index 039f2187..00000000 --- a/pelican/tests/output/basic/drafts/a-draft-article-without-date.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - A draft article without date - - - - - - - -
    -
    -
    -

    - A draft article without date

    -
    - -
    -
    - - Published: - - -

    In misc.

    - -

    This is a draft article, it should live under the /drafts/ folder and not be -listed anywhere else.

    - -
    - -
    -
    -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/drafts/a-draft-article.html b/pelican/tests/output/basic/drafts/a-draft-article.html deleted file mode 100644 index 068b414a..00000000 --- a/pelican/tests/output/basic/drafts/a-draft-article.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - A draft article - - - - - - - -
    -
    -
    -

    - A draft article

    -
    - -
    -
    - - Published: Sun 08 May 2011 - - -

    In misc.

    - -

    This is a draft article, it should live under the /drafts/ folder and not be -listed anywhere else.

    - -
    - -
    -
    -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/feeds/alexis-metaireau.atom.xml b/pelican/tests/output/basic/feeds/alexis-metaireau.atom.xml deleted file mode 100644 index 8f9a85fa..00000000 --- a/pelican/tests/output/basic/feeds/alexis-metaireau.atom.xml +++ /dev/null @@ -1,22 +0,0 @@ - -A Pelican Blog - Alexis Métaireau/2013-11-17T23:29:00+00:00This is a super article !2010-12-02T10:14:00+00:002013-11-17T23:29:00+00:00Alexis Métaireautag:None,2010-12-02:/this-is-a-super-article.html<p class="first last">Multi-line metadata should be supported -as well as <strong>inline markup</strong>.</p> -<p>Some content here !</p> -<div class="section" id="this-is-a-simple-title"> -<h2>This is a simple title</h2> -<p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p> -<img alt="alternate text" src="/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -<img alt="alternate text" src="/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /> -<pre class="literal-block"> -&gt;&gt;&gt; from ipdb import set_trace -&gt;&gt;&gt; set_trace() -</pre> -<p>→ And now try with some utf8 hell: ééé</p> -</div> -Oh yeah !2010-10-20T10:14:00+00:002010-10-20T10:14:00+00:00Alexis Métaireautag:None,2010-10-20:/oh-yeah.html<div class="section" id="why-not"> -<h2>Why not ?</h2> -<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !</p> -<img alt="alternate text" src="/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> - \ No newline at end of file diff --git a/pelican/tests/output/basic/feeds/alexis-metaireau.rss.xml b/pelican/tests/output/basic/feeds/alexis-metaireau.rss.xml deleted file mode 100644 index 1af41d47..00000000 --- a/pelican/tests/output/basic/feeds/alexis-metaireau.rss.xml +++ /dev/null @@ -1,10 +0,0 @@ - -A Pelican Blog - Alexis Métaireau/Sun, 17 Nov 2013 23:29:00 +0000This is a super article !/this-is-a-super-article.html<p class="first last">Multi-line metadata should be supported -as well as <strong>inline markup</strong>.</p> -Alexis MétaireauThu, 02 Dec 2010 10:14:00 +0000tag:None,2010-12-02:/this-is-a-super-article.htmlyeahfoobarfoobarOh yeah !/oh-yeah.html<div class="section" id="why-not"> -<h2>Why not ?</h2> -<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !</p> -<img alt="alternate text" src="/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> -Alexis MétaireauWed, 20 Oct 2010 10:14:00 +0000tag:None,2010-10-20:/oh-yeah.htmlbarohbaryeah \ No newline at end of file diff --git a/pelican/tests/output/basic/feeds/all-en.atom.xml b/pelican/tests/output/basic/feeds/all-en.atom.xml deleted file mode 100644 index 250d75db..00000000 --- a/pelican/tests/output/basic/feeds/all-en.atom.xml +++ /dev/null @@ -1,74 +0,0 @@ - -A Pelican Blog/2013-11-17T23:29:00+00:00FILENAME_METADATA example2012-11-30T00:00:00+00:002012-11-30T00:00:00+00:00tag:None,2012-11-30:/filename_metadata-example.html<p>Some cool stuff!</p> -Second article2012-02-29T00:00:00+00:002012-02-29T00:00:00+00:00tag:None,2012-02-29:/second-article.html<p>This is some article, in english</p> -A markdown powered article2011-04-20T00:00:00+00:002011-04-20T00:00:00+00:00tag:None,2011-04-20:/a-markdown-powered-article.html<p>You're mutually oblivious.</p> -<p><a href="/unbelievable.html">a root-relative link to unbelievable</a> -<a href="/unbelievable.html">a file-relative link to unbelievable</a></p>Article 12011-02-17T00:00:00+00:002011-02-17T00:00:00+00:00tag:None,2011-02-17:/article-1.html<p>Article 1</p> -Article 22011-02-17T00:00:00+00:002011-02-17T00:00:00+00:00tag:None,2011-02-17:/article-2.html<p>Article 2</p> -Article 32011-02-17T00:00:00+00:002011-02-17T00:00:00+00:00tag:None,2011-02-17:/article-3.html<p>Article 3</p> -This is a super article !2010-12-02T10:14:00+00:002013-11-17T23:29:00+00:00Alexis Métaireautag:None,2010-12-02:/this-is-a-super-article.html<p class="first last">Multi-line metadata should be supported -as well as <strong>inline markup</strong>.</p> -<p>Some content here !</p> -<div class="section" id="this-is-a-simple-title"> -<h2>This is a simple title</h2> -<p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p> -<img alt="alternate text" src="/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -<img alt="alternate text" src="/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /> -<pre class="literal-block"> -&gt;&gt;&gt; from ipdb import set_trace -&gt;&gt;&gt; set_trace() -</pre> -<p>→ And now try with some utf8 hell: ééé</p> -</div> -Oh yeah !2010-10-20T10:14:00+00:002010-10-20T10:14:00+00:00Alexis Métaireautag:None,2010-10-20:/oh-yeah.html<div class="section" id="why-not"> -<h2>Why not ?</h2> -<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !</p> -<img alt="alternate text" src="/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> -Unbelievable !2010-10-15T20:30:00+00:002010-10-15T20:30:00+00:00tag:None,2010-10-15:/unbelievable.html<p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="/a-markdown-powered-article.html">a root-relative link to markdown-article</a> -<a class="reference external" href="/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div><p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="/a-markdown-powered-article.html">a root-relative link to markdown-article</a> -<a class="reference external" href="/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will have nothing in default.</p> -<div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -<p>Lovely.</p> -</div> -<div class="section" id="testing-more-sourcecode-directives"> -<h2>Testing more sourcecode directives</h2> -<div class="highlight"><pre><span></span><span id="foo-8"><a name="foo-8"></a><a href="#foo-8"><span class="linenos special"> 8</span></a><span class="testingk">def</span> <span class="testingnf">run</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingp">):</span><br></span><span id="foo-9"><a name="foo-9"></a><a href="#foo-9"><span class="linenos"> </span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">assert_has_content</span><span class="testingp">()</span><br></span><span id="foo-10"><a name="foo-10"></a><a href="#foo-10"><span class="linenos special">10</span></a> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a name="foo-11"></a><a href="#foo-11"><span class="linenos"> </span></a> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">get_lexer_by_name</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">arguments</span><span class="testingp">[</span><span class="testingmi">0</span><span class="testingp">])</span><br></span><span id="foo-12"><a name="foo-12"></a><a href="#foo-12"><span class="linenos special">12</span></a> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a name="foo-13"></a><a href="#foo-13"><span class="linenos"> </span></a> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a name="foo-14"></a><a href="#foo-14"><span class="linenos special">14</span></a> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">TextLexer</span><span class="testingp">()</span><br></span><span id="foo-15"><a name="foo-15"></a><a href="#foo-15"><span class="linenos"> </span></a><br></span><span id="foo-16"><a name="foo-16"></a><a href="#foo-16"><span class="linenos special">16</span></a> <span class="testingk">if</span> <span class="testingp">(</span><span class="testings1">&#39;linenos&#39;</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span> <span class="testingow">and</span><br></span><span id="foo-17"><a name="foo-17"></a><a href="#foo-17"><span class="linenos"> </span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingow">not</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;table&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;inline&#39;</span><span class="testingp">)):</span><br></span><span id="foo-18"><a name="foo-18"></a><a href="#foo-18"><span class="linenos special">18</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testings1">&#39;table&#39;</span><br></span><span id="foo-19"><a name="foo-19"></a><a href="#foo-19"><span class="linenos"> </span></a><br></span><span id="foo-20"><a name="foo-20"></a><a href="#foo-20"><span class="linenos special">20</span></a> <span class="testingk">for</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;nowrap&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;nobackground&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;anchorlinenos&#39;</span><span class="testingp">):</span><br></span><span id="foo-21"><a name="foo-21"></a><a href="#foo-21"><span class="linenos"> </span></a> <span class="testingk">if</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">:</span><br></span><span id="foo-22"><a name="foo-22"></a><a href="#foo-22"><span class="linenos special">22</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testingn">flag</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testingkc">True</span><br></span><span id="foo-23"><a name="foo-23"></a><a href="#foo-23"><span class="linenos"> </span></a><br></span><span id="foo-24"><a name="foo-24"></a><a href="#foo-24"><span class="linenos special">24</span></a> <span class="testingc1"># noclasses should already default to False, but just in case...</span><br></span><span id="foo-25"><a name="foo-25"></a><a href="#foo-25"><span class="linenos"> </span></a> <span class="testingn">formatter</span> <span class="testingo">=</span> <span class="testingn">HtmlFormatter</span><span class="testingp">(</span><span class="testingn">noclasses</span><span class="testingo">=</span><span class="testingkc">False</span><span class="testingp">,</span> <span class="testingo">**</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">)</span><br></span><span id="foo-26"><a name="foo-26"></a><a href="#foo-26"><span class="linenos special">26</span></a> <span class="testingn">parsed</span> <span class="testingo">=</span> <span class="testingn">highlight</span><span class="testingp">(</span><span class="testings1">&#39;</span><span class="testingse">\n</span><span class="testings1">&#39;</span><span class="testingo">.</span><span class="testingn">join</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">content</span><span class="testingp">),</span> <span class="testingn">lexer</span><span class="testingp">,</span> <span class="testingn">formatter</span><span class="testingp">)</span><br></span><span id="foo-27"><a name="foo-27"></a><a href="#foo-27"><span class="linenos"> </span></a> <span class="testingk">return</span> <span class="testingp">[</span><span class="testingn">nodes</span><span class="testingo">.</span><span class="testingn">raw</span><span class="testingp">(</span><span class="testings1">&#39;&#39;</span><span class="testingp">,</span> <span class="testingn">parsed</span><span class="testingp">,</span> <span class="testingnb">format</span><span class="testingo">=</span><span class="testings1">&#39;html&#39;</span><span class="testingp">)]</span><br></span></pre></div> -<p>Lovely.</p> -</div> -<div class="section" id="testing-even-more-sourcecode-directives"> -<h2>Testing even more sourcecode directives</h2> -<span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -<p>Lovely.</p> -</div> -<div class="section" id="testing-overriding-config-defaults"> -<h2>Testing overriding config defaults</h2> -<p>Even if the default is line numbers, we can override it here</p> -<div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -<p>Lovely.</p> -</div> -The baz tag2010-03-14T00:00:00+00:002010-03-14T00:00:00+00:00tag:None,2010-03-14:/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> - \ No newline at end of file diff --git a/pelican/tests/output/basic/feeds/all-fr.atom.xml b/pelican/tests/output/basic/feeds/all-fr.atom.xml deleted file mode 100644 index 4ecf7534..00000000 --- a/pelican/tests/output/basic/feeds/all-fr.atom.xml +++ /dev/null @@ -1,4 +0,0 @@ - -A Pelican Blog/2012-02-29T00:00:00+00:00Deuxième article2012-02-29T00:00:00+00:002012-02-29T00:00:00+00:00tag:None,2012-02-29:/second-article-fr.html<p>Ceci est un article, en français.</p> -Trop bien !2010-10-20T10:14:00+00:002010-10-20T10:14:00+00:00tag:None,2010-10-20:/oh-yeah-fr.html<p>Et voila du contenu en français</p> - \ No newline at end of file diff --git a/pelican/tests/output/basic/feeds/all.atom.xml b/pelican/tests/output/basic/feeds/all.atom.xml deleted file mode 100644 index 1abfef18..00000000 --- a/pelican/tests/output/basic/feeds/all.atom.xml +++ /dev/null @@ -1,76 +0,0 @@ - -A Pelican Blog/2013-11-17T23:29:00+00:00FILENAME_METADATA example2012-11-30T00:00:00+00:002012-11-30T00:00:00+00:00tag:None,2012-11-30:/filename_metadata-example.html<p>Some cool stuff!</p> -Second article2012-02-29T00:00:00+00:002012-02-29T00:00:00+00:00tag:None,2012-02-29:/second-article.html<p>This is some article, in english</p> -Deuxième article2012-02-29T00:00:00+00:002012-02-29T00:00:00+00:00tag:None,2012-02-29:/second-article-fr.html<p>Ceci est un article, en français.</p> -A markdown powered article2011-04-20T00:00:00+00:002011-04-20T00:00:00+00:00tag:None,2011-04-20:/a-markdown-powered-article.html<p>You're mutually oblivious.</p> -<p><a href="/unbelievable.html">a root-relative link to unbelievable</a> -<a href="/unbelievable.html">a file-relative link to unbelievable</a></p>Article 12011-02-17T00:00:00+00:002011-02-17T00:00:00+00:00tag:None,2011-02-17:/article-1.html<p>Article 1</p> -Article 22011-02-17T00:00:00+00:002011-02-17T00:00:00+00:00tag:None,2011-02-17:/article-2.html<p>Article 2</p> -Article 32011-02-17T00:00:00+00:002011-02-17T00:00:00+00:00tag:None,2011-02-17:/article-3.html<p>Article 3</p> -This is a super article !2010-12-02T10:14:00+00:002013-11-17T23:29:00+00:00Alexis Métaireautag:None,2010-12-02:/this-is-a-super-article.html<p class="first last">Multi-line metadata should be supported -as well as <strong>inline markup</strong>.</p> -<p>Some content here !</p> -<div class="section" id="this-is-a-simple-title"> -<h2>This is a simple title</h2> -<p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p> -<img alt="alternate text" src="/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -<img alt="alternate text" src="/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /> -<pre class="literal-block"> -&gt;&gt;&gt; from ipdb import set_trace -&gt;&gt;&gt; set_trace() -</pre> -<p>→ And now try with some utf8 hell: ééé</p> -</div> -Oh yeah !2010-10-20T10:14:00+00:002010-10-20T10:14:00+00:00Alexis Métaireautag:None,2010-10-20:/oh-yeah.html<div class="section" id="why-not"> -<h2>Why not ?</h2> -<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !</p> -<img alt="alternate text" src="/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> -Trop bien !2010-10-20T10:14:00+00:002010-10-20T10:14:00+00:00tag:None,2010-10-20:/oh-yeah-fr.html<p>Et voila du contenu en français</p> -Unbelievable !2010-10-15T20:30:00+00:002010-10-15T20:30:00+00:00tag:None,2010-10-15:/unbelievable.html<p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="/a-markdown-powered-article.html">a root-relative link to markdown-article</a> -<a class="reference external" href="/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div><p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="/a-markdown-powered-article.html">a root-relative link to markdown-article</a> -<a class="reference external" href="/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will have nothing in default.</p> -<div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -<p>Lovely.</p> -</div> -<div class="section" id="testing-more-sourcecode-directives"> -<h2>Testing more sourcecode directives</h2> -<div class="highlight"><pre><span></span><span id="foo-8"><a name="foo-8"></a><a href="#foo-8"><span class="linenos special"> 8</span></a><span class="testingk">def</span> <span class="testingnf">run</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingp">):</span><br></span><span id="foo-9"><a name="foo-9"></a><a href="#foo-9"><span class="linenos"> </span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">assert_has_content</span><span class="testingp">()</span><br></span><span id="foo-10"><a name="foo-10"></a><a href="#foo-10"><span class="linenos special">10</span></a> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a name="foo-11"></a><a href="#foo-11"><span class="linenos"> </span></a> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">get_lexer_by_name</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">arguments</span><span class="testingp">[</span><span class="testingmi">0</span><span class="testingp">])</span><br></span><span id="foo-12"><a name="foo-12"></a><a href="#foo-12"><span class="linenos special">12</span></a> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a name="foo-13"></a><a href="#foo-13"><span class="linenos"> </span></a> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a name="foo-14"></a><a href="#foo-14"><span class="linenos special">14</span></a> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">TextLexer</span><span class="testingp">()</span><br></span><span id="foo-15"><a name="foo-15"></a><a href="#foo-15"><span class="linenos"> </span></a><br></span><span id="foo-16"><a name="foo-16"></a><a href="#foo-16"><span class="linenos special">16</span></a> <span class="testingk">if</span> <span class="testingp">(</span><span class="testings1">&#39;linenos&#39;</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span> <span class="testingow">and</span><br></span><span id="foo-17"><a name="foo-17"></a><a href="#foo-17"><span class="linenos"> </span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingow">not</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;table&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;inline&#39;</span><span class="testingp">)):</span><br></span><span id="foo-18"><a name="foo-18"></a><a href="#foo-18"><span class="linenos special">18</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testings1">&#39;table&#39;</span><br></span><span id="foo-19"><a name="foo-19"></a><a href="#foo-19"><span class="linenos"> </span></a><br></span><span id="foo-20"><a name="foo-20"></a><a href="#foo-20"><span class="linenos special">20</span></a> <span class="testingk">for</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;nowrap&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;nobackground&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;anchorlinenos&#39;</span><span class="testingp">):</span><br></span><span id="foo-21"><a name="foo-21"></a><a href="#foo-21"><span class="linenos"> </span></a> <span class="testingk">if</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">:</span><br></span><span id="foo-22"><a name="foo-22"></a><a href="#foo-22"><span class="linenos special">22</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testingn">flag</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testingkc">True</span><br></span><span id="foo-23"><a name="foo-23"></a><a href="#foo-23"><span class="linenos"> </span></a><br></span><span id="foo-24"><a name="foo-24"></a><a href="#foo-24"><span class="linenos special">24</span></a> <span class="testingc1"># noclasses should already default to False, but just in case...</span><br></span><span id="foo-25"><a name="foo-25"></a><a href="#foo-25"><span class="linenos"> </span></a> <span class="testingn">formatter</span> <span class="testingo">=</span> <span class="testingn">HtmlFormatter</span><span class="testingp">(</span><span class="testingn">noclasses</span><span class="testingo">=</span><span class="testingkc">False</span><span class="testingp">,</span> <span class="testingo">**</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">)</span><br></span><span id="foo-26"><a name="foo-26"></a><a href="#foo-26"><span class="linenos special">26</span></a> <span class="testingn">parsed</span> <span class="testingo">=</span> <span class="testingn">highlight</span><span class="testingp">(</span><span class="testings1">&#39;</span><span class="testingse">\n</span><span class="testings1">&#39;</span><span class="testingo">.</span><span class="testingn">join</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">content</span><span class="testingp">),</span> <span class="testingn">lexer</span><span class="testingp">,</span> <span class="testingn">formatter</span><span class="testingp">)</span><br></span><span id="foo-27"><a name="foo-27"></a><a href="#foo-27"><span class="linenos"> </span></a> <span class="testingk">return</span> <span class="testingp">[</span><span class="testingn">nodes</span><span class="testingo">.</span><span class="testingn">raw</span><span class="testingp">(</span><span class="testings1">&#39;&#39;</span><span class="testingp">,</span> <span class="testingn">parsed</span><span class="testingp">,</span> <span class="testingnb">format</span><span class="testingo">=</span><span class="testings1">&#39;html&#39;</span><span class="testingp">)]</span><br></span></pre></div> -<p>Lovely.</p> -</div> -<div class="section" id="testing-even-more-sourcecode-directives"> -<h2>Testing even more sourcecode directives</h2> -<span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -<p>Lovely.</p> -</div> -<div class="section" id="testing-overriding-config-defaults"> -<h2>Testing overriding config defaults</h2> -<p>Even if the default is line numbers, we can override it here</p> -<div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -<p>Lovely.</p> -</div> -The baz tag2010-03-14T00:00:00+00:002010-03-14T00:00:00+00:00tag:None,2010-03-14:/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> - \ No newline at end of file diff --git a/pelican/tests/output/basic/feeds/bar.atom.xml b/pelican/tests/output/basic/feeds/bar.atom.xml deleted file mode 100644 index edd1170a..00000000 --- a/pelican/tests/output/basic/feeds/bar.atom.xml +++ /dev/null @@ -1,8 +0,0 @@ - -A Pelican Blog - bar/2010-10-20T10:14:00+00:00Oh yeah !2010-10-20T10:14:00+00:002010-10-20T10:14:00+00:00Alexis Métaireautag:None,2010-10-20:/oh-yeah.html<div class="section" id="why-not"> -<h2>Why not ?</h2> -<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !</p> -<img alt="alternate text" src="/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> - \ No newline at end of file diff --git a/pelican/tests/output/basic/feeds/cat1.atom.xml b/pelican/tests/output/basic/feeds/cat1.atom.xml deleted file mode 100644 index 8516b95c..00000000 --- a/pelican/tests/output/basic/feeds/cat1.atom.xml +++ /dev/null @@ -1,7 +0,0 @@ - -A Pelican Blog - cat1/2011-04-20T00:00:00+00:00A markdown powered article2011-04-20T00:00:00+00:002011-04-20T00:00:00+00:00tag:None,2011-04-20:/a-markdown-powered-article.html<p>You're mutually oblivious.</p> -<p><a href="/unbelievable.html">a root-relative link to unbelievable</a> -<a href="/unbelievable.html">a file-relative link to unbelievable</a></p>Article 12011-02-17T00:00:00+00:002011-02-17T00:00:00+00:00tag:None,2011-02-17:/article-1.html<p>Article 1</p> -Article 22011-02-17T00:00:00+00:002011-02-17T00:00:00+00:00tag:None,2011-02-17:/article-2.html<p>Article 2</p> -Article 32011-02-17T00:00:00+00:002011-02-17T00:00:00+00:00tag:None,2011-02-17:/article-3.html<p>Article 3</p> - \ No newline at end of file diff --git a/pelican/tests/output/basic/feeds/misc.atom.xml b/pelican/tests/output/basic/feeds/misc.atom.xml deleted file mode 100644 index 2b09bda3..00000000 --- a/pelican/tests/output/basic/feeds/misc.atom.xml +++ /dev/null @@ -1,49 +0,0 @@ - -A Pelican Blog - misc/2012-11-30T00:00:00+00:00FILENAME_METADATA example2012-11-30T00:00:00+00:002012-11-30T00:00:00+00:00tag:None,2012-11-30:/filename_metadata-example.html<p>Some cool stuff!</p> -Second article2012-02-29T00:00:00+00:002012-02-29T00:00:00+00:00tag:None,2012-02-29:/second-article.html<p>This is some article, in english</p> -Unbelievable !2010-10-15T20:30:00+00:002010-10-15T20:30:00+00:00tag:None,2010-10-15:/unbelievable.html<p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="/a-markdown-powered-article.html">a root-relative link to markdown-article</a> -<a class="reference external" href="/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div><p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="/a-markdown-powered-article.html">a root-relative link to markdown-article</a> -<a class="reference external" href="/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will have nothing in default.</p> -<div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -<p>Lovely.</p> -</div> -<div class="section" id="testing-more-sourcecode-directives"> -<h2>Testing more sourcecode directives</h2> -<div class="highlight"><pre><span></span><span id="foo-8"><a name="foo-8"></a><a href="#foo-8"><span class="linenos special"> 8</span></a><span class="testingk">def</span> <span class="testingnf">run</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingp">):</span><br></span><span id="foo-9"><a name="foo-9"></a><a href="#foo-9"><span class="linenos"> </span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">assert_has_content</span><span class="testingp">()</span><br></span><span id="foo-10"><a name="foo-10"></a><a href="#foo-10"><span class="linenos special">10</span></a> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a name="foo-11"></a><a href="#foo-11"><span class="linenos"> </span></a> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">get_lexer_by_name</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">arguments</span><span class="testingp">[</span><span class="testingmi">0</span><span class="testingp">])</span><br></span><span id="foo-12"><a name="foo-12"></a><a href="#foo-12"><span class="linenos special">12</span></a> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a name="foo-13"></a><a href="#foo-13"><span class="linenos"> </span></a> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a name="foo-14"></a><a href="#foo-14"><span class="linenos special">14</span></a> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">TextLexer</span><span class="testingp">()</span><br></span><span id="foo-15"><a name="foo-15"></a><a href="#foo-15"><span class="linenos"> </span></a><br></span><span id="foo-16"><a name="foo-16"></a><a href="#foo-16"><span class="linenos special">16</span></a> <span class="testingk">if</span> <span class="testingp">(</span><span class="testings1">&#39;linenos&#39;</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span> <span class="testingow">and</span><br></span><span id="foo-17"><a name="foo-17"></a><a href="#foo-17"><span class="linenos"> </span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingow">not</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;table&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;inline&#39;</span><span class="testingp">)):</span><br></span><span id="foo-18"><a name="foo-18"></a><a href="#foo-18"><span class="linenos special">18</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testings1">&#39;table&#39;</span><br></span><span id="foo-19"><a name="foo-19"></a><a href="#foo-19"><span class="linenos"> </span></a><br></span><span id="foo-20"><a name="foo-20"></a><a href="#foo-20"><span class="linenos special">20</span></a> <span class="testingk">for</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;nowrap&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;nobackground&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;anchorlinenos&#39;</span><span class="testingp">):</span><br></span><span id="foo-21"><a name="foo-21"></a><a href="#foo-21"><span class="linenos"> </span></a> <span class="testingk">if</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">:</span><br></span><span id="foo-22"><a name="foo-22"></a><a href="#foo-22"><span class="linenos special">22</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testingn">flag</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testingkc">True</span><br></span><span id="foo-23"><a name="foo-23"></a><a href="#foo-23"><span class="linenos"> </span></a><br></span><span id="foo-24"><a name="foo-24"></a><a href="#foo-24"><span class="linenos special">24</span></a> <span class="testingc1"># noclasses should already default to False, but just in case...</span><br></span><span id="foo-25"><a name="foo-25"></a><a href="#foo-25"><span class="linenos"> </span></a> <span class="testingn">formatter</span> <span class="testingo">=</span> <span class="testingn">HtmlFormatter</span><span class="testingp">(</span><span class="testingn">noclasses</span><span class="testingo">=</span><span class="testingkc">False</span><span class="testingp">,</span> <span class="testingo">**</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">)</span><br></span><span id="foo-26"><a name="foo-26"></a><a href="#foo-26"><span class="linenos special">26</span></a> <span class="testingn">parsed</span> <span class="testingo">=</span> <span class="testingn">highlight</span><span class="testingp">(</span><span class="testings1">&#39;</span><span class="testingse">\n</span><span class="testings1">&#39;</span><span class="testingo">.</span><span class="testingn">join</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">content</span><span class="testingp">),</span> <span class="testingn">lexer</span><span class="testingp">,</span> <span class="testingn">formatter</span><span class="testingp">)</span><br></span><span id="foo-27"><a name="foo-27"></a><a href="#foo-27"><span class="linenos"> </span></a> <span class="testingk">return</span> <span class="testingp">[</span><span class="testingn">nodes</span><span class="testingo">.</span><span class="testingn">raw</span><span class="testingp">(</span><span class="testings1">&#39;&#39;</span><span class="testingp">,</span> <span class="testingn">parsed</span><span class="testingp">,</span> <span class="testingnb">format</span><span class="testingo">=</span><span class="testings1">&#39;html&#39;</span><span class="testingp">)]</span><br></span></pre></div> -<p>Lovely.</p> -</div> -<div class="section" id="testing-even-more-sourcecode-directives"> -<h2>Testing even more sourcecode directives</h2> -<span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -<p>Lovely.</p> -</div> -<div class="section" id="testing-overriding-config-defaults"> -<h2>Testing overriding config defaults</h2> -<p>Even if the default is line numbers, we can override it here</p> -<div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -<p>Lovely.</p> -</div> -The baz tag2010-03-14T00:00:00+00:002010-03-14T00:00:00+00:00tag:None,2010-03-14:/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> - \ No newline at end of file diff --git a/pelican/tests/output/basic/feeds/yeah.atom.xml b/pelican/tests/output/basic/feeds/yeah.atom.xml deleted file mode 100644 index 6f871915..00000000 --- a/pelican/tests/output/basic/feeds/yeah.atom.xml +++ /dev/null @@ -1,16 +0,0 @@ - -A Pelican Blog - yeah/2013-11-17T23:29:00+00:00This is a super article !2010-12-02T10:14:00+00:002013-11-17T23:29:00+00:00Alexis Métaireautag:None,2010-12-02:/this-is-a-super-article.html<p class="first last">Multi-line metadata should be supported -as well as <strong>inline markup</strong>.</p> -<p>Some content here !</p> -<div class="section" id="this-is-a-simple-title"> -<h2>This is a simple title</h2> -<p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p> -<img alt="alternate text" src="/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -<img alt="alternate text" src="/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /> -<pre class="literal-block"> -&gt;&gt;&gt; from ipdb import set_trace -&gt;&gt;&gt; set_trace() -</pre> -<p>→ And now try with some utf8 hell: ééé</p> -</div> - \ No newline at end of file diff --git a/pelican/tests/output/basic/filename_metadata-example.html b/pelican/tests/output/basic/filename_metadata-example.html deleted file mode 100644 index 6a6ee389..00000000 --- a/pelican/tests/output/basic/filename_metadata-example.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - FILENAME_METADATA example - - - - - - - -
    -
    -
    -

    - FILENAME_METADATA example

    -
    - -
    -
    - - Published: Fri 30 November 2012 - - -

    In misc.

    - -

    Some cool stuff!

    - -
    - -
    -
    -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/index.html b/pelican/tests/output/basic/index.html deleted file mode 100644 index e10477db..00000000 --- a/pelican/tests/output/basic/index.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - A Pelican Blog - - - - - - - - -
    -

    Other articles

    -
    -
      - -
    1. - -
    2. - -
    3. - -
    4. - -
    5. - -
    6. - -
    7. -
      -

      Oh yeah !

      -
      - -
      -
      -

      Why not ?

      -

      After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !

      -alternate text -
      - - read more -
      -
    8. - -
    9. - -
    10. -
      -

      The baz tag

      -
      - -
      -
      - - Published: Sun 14 March 2010 - - -

      In misc.

      - -

      This article overrides the listening of the articles under the baz tag.

      - - read more -
      -
    11. -
    -
    -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/oh-yeah-fr.html b/pelican/tests/output/basic/oh-yeah-fr.html deleted file mode 100644 index 58b933aa..00000000 --- a/pelican/tests/output/basic/oh-yeah-fr.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - Trop bien ! - - - - - - - - - -
    -
    -
    -

    - Trop bien !

    -
    - -
    -
    - - Published: Wed 20 October 2010 - - -

    In misc.

    -Translations: - en - -

    Et voila du contenu en français

    - -
    - -
    -
    -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/oh-yeah.html b/pelican/tests/output/basic/oh-yeah.html deleted file mode 100644 index 1b8077f8..00000000 --- a/pelican/tests/output/basic/oh-yeah.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - Oh yeah ! - - - - - - - - - -
    -
    -
    -

    - Oh yeah !

    -
    - -
    -
    -

    Why not ?

    -

    After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !

    -alternate text -
    - -
    - -
    -
    -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/override/index.html b/pelican/tests/output/basic/override/index.html deleted file mode 100644 index c3613174..00000000 --- a/pelican/tests/output/basic/override/index.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - Override url/save_as - - - - - - -
    -

    Override url/save_as

    - -

    Test page which overrides save_as and url so that this page will be generated -at a custom location.

    - -
    -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/pages/this-is-a-test-hidden-page.html b/pelican/tests/output/basic/pages/this-is-a-test-hidden-page.html deleted file mode 100644 index 21fabf62..00000000 --- a/pelican/tests/output/basic/pages/this-is-a-test-hidden-page.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - This is a test hidden page - - - - - - -
    -

    This is a test hidden page

    - -

    This is great for things like error(404) pages -Anyone can see this page but it's not linked to anywhere!

    - -
    -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/pages/this-is-a-test-page.html b/pelican/tests/output/basic/pages/this-is-a-test-page.html deleted file mode 100644 index 3970e3ff..00000000 --- a/pelican/tests/output/basic/pages/this-is-a-test-page.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - This is a test page - - - - - - -
    -

    This is a test page

    - -

    Just an image.

    -alternate text -wrong path since 'images' folder does not exist - -
    -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/pictures/Fat_Cat.jpg b/pelican/tests/output/basic/pictures/Fat_Cat.jpg deleted file mode 100644 index d8a96d35..00000000 Binary files a/pelican/tests/output/basic/pictures/Fat_Cat.jpg and /dev/null differ diff --git a/pelican/tests/output/basic/pictures/Sushi.jpg b/pelican/tests/output/basic/pictures/Sushi.jpg deleted file mode 100644 index e49e5f0a..00000000 Binary files a/pelican/tests/output/basic/pictures/Sushi.jpg and /dev/null differ diff --git a/pelican/tests/output/basic/pictures/Sushi_Macro.jpg b/pelican/tests/output/basic/pictures/Sushi_Macro.jpg deleted file mode 100644 index 21f935a1..00000000 Binary files a/pelican/tests/output/basic/pictures/Sushi_Macro.jpg and /dev/null differ diff --git a/pelican/tests/output/basic/second-article-fr.html b/pelican/tests/output/basic/second-article-fr.html deleted file mode 100644 index 87b95cc4..00000000 --- a/pelican/tests/output/basic/second-article-fr.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - Deuxième article - - - - - - - - - -
    -
    -
    -

    - Deuxième article

    -
    - -
    -
    - - Published: Wed 29 February 2012 - - -

    In misc.

    -

    tags: foo bar baz

    Translations: - en - -

    Ceci est un article, en français.

    - -
    - -
    -
    -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/second-article.html b/pelican/tests/output/basic/second-article.html deleted file mode 100644 index 3e0c5296..00000000 --- a/pelican/tests/output/basic/second-article.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - Second article - - - - - - - - - -
    -
    -
    -

    - Second article

    -
    - -
    -
    - - Published: Wed 29 February 2012 - - -

    In misc.

    -

    tags: foo bar baz

    Translations: - fr - -

    This is some article, in english

    - -
    - -
    -
    -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/tag/bar.html b/pelican/tests/output/basic/tag/bar.html deleted file mode 100644 index ead02cd8..00000000 --- a/pelican/tests/output/basic/tag/bar.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - A Pelican Blog - bar - - - - - - - - -
    -

    Other articles

    -
    -
      - -
    1. - -
    2. -
      -

      Oh yeah !

      -
      - -
      -
      -

      Why not ?

      -

      After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !

      -alternate text -
      - - read more -
      -
    3. -
    -
    -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/tag/baz.html b/pelican/tests/output/basic/tag/baz.html deleted file mode 100644 index c891121e..00000000 --- a/pelican/tests/output/basic/tag/baz.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - The baz tag - - - - - - - -
    -
    -
    -

    - The baz tag

    -
    - -
    -
    - - Published: Sun 14 March 2010 - - -

    In misc.

    - -

    This article overrides the listening of the articles under the baz tag.

    - -
    - -
    -
    -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/tag/foo.html b/pelican/tests/output/basic/tag/foo.html deleted file mode 100644 index 3a00a6ab..00000000 --- a/pelican/tests/output/basic/tag/foo.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - A Pelican Blog - foo - - - - - - - - -
    -

    Other articles

    -
    -
      - -
    1. -
    -
    -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/tag/foobar.html b/pelican/tests/output/basic/tag/foobar.html deleted file mode 100644 index 5418f872..00000000 --- a/pelican/tests/output/basic/tag/foobar.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - A Pelican Blog - foobar - - - - - - - - -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/tag/oh.html b/pelican/tests/output/basic/tag/oh.html deleted file mode 100644 index c2de8b5b..00000000 --- a/pelican/tests/output/basic/tag/oh.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - Oh Oh Oh - - - - - - -
    -

    Oh Oh Oh

    - -

    This page overrides the listening of the articles under the oh tag.

    - -
    -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/tag/yeah.html b/pelican/tests/output/basic/tag/yeah.html deleted file mode 100644 index 88660359..00000000 --- a/pelican/tests/output/basic/tag/yeah.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - A Pelican Blog - yeah - - - - - - - - -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/tags.html b/pelican/tests/output/basic/tags.html deleted file mode 100644 index 3f88ce9e..00000000 --- a/pelican/tests/output/basic/tags.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - A Pelican Blog - Tags - - - - - - - -
    -

    Tags for A Pelican Blog

    - -
    - -
    -
    -

    social

    - -
    -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/theme/css/fonts.css b/pelican/tests/output/basic/theme/css/fonts.css deleted file mode 100644 index 56015076..00000000 --- a/pelican/tests/output/basic/theme/css/fonts.css +++ /dev/null @@ -1,12 +0,0 @@ -@font-face { - font-family: 'Yanone Kaffeesatz'; - font-style: normal; - font-weight: 400; - src: - local('Yanone Kaffeesatz Regular'), - local('YanoneKaffeesatz-Regular'), - /* from https://fonts.gstatic.com/s/yanonekaffeesatz/v8/YDAoLskQQ5MOAgvHUQCcLRTHiN2BPBirwIkMLKUspj4.woff */ - url('../fonts/Yanone_Kaffeesatz_400.woff') format('woff'), - /* from https://fonts.gstatic.com/s/yanonekaffeesatz/v8/YDAoLskQQ5MOAgvHUQCcLfGwxTS8d1Q9KiDNCMKLFUM.woff2 */ - url('../fonts/Yanone_Kaffeesatz_400.woff2') format('woff2'); -} diff --git a/pelican/tests/output/basic/theme/css/main.css b/pelican/tests/output/basic/theme/css/main.css deleted file mode 100644 index aaea9b81..00000000 --- a/pelican/tests/output/basic/theme/css/main.css +++ /dev/null @@ -1,466 +0,0 @@ -/* - Name: Smashing HTML5 - Date: July 2009 - Description: Sample layout for HTML5 and CSS3 goodness. - Version: 1.0 - License: MIT - Licensed by: Smashing Media GmbH - Original author: Enrique Ramírez -*/ - -/* Imports */ -@import url("reset.css"); -@import url("pygment.css"); -@import url("typogrify.css"); -@import url("fonts.css"); - -/***** Global *****/ -/* Body */ -body { - background: #F5F4EF; - color: #000305; - font-size: 87.5%; /* Base font size: 14px */ - font-family: 'Trebuchet MS', Trebuchet, 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; - line-height: 1.429; - margin: 0; - padding: 0; - text-align: left; -} - -/* Headings */ -h1 {font-size: 2em } -h2 {font-size: 1.571em} /* 22px */ -h3 {font-size: 1.429em} /* 20px */ -h4 {font-size: 1.286em} /* 18px */ -h5 {font-size: 1.143em} /* 16px */ -h6 {font-size: 1em} /* 14px */ - -h1, h2, h3, h4, h5, h6 { - font-weight: 400; - line-height: 1.1; - margin-bottom: .8em; - font-family: 'Yanone Kaffeesatz', arial, serif; -} - -h3, h4, h5, h6 { margin-top: .8em; } - -hr { border: 2px solid #EEEEEE; } - -/* Anchors */ -a {outline: 0;} -a img {border: 0px; text-decoration: none;} -a:link, a:visited { - color: #C74350; - padding: 0 1px; - text-decoration: underline; -} -a:hover, a:active { - background-color: #C74350; - color: #fff; - text-decoration: none; - text-shadow: 1px 1px 1px #333; -} - -h1 a:hover { - background-color: inherit -} - -/* Paragraphs */ -div.line-block, -p { margin-top: 1em; - margin-bottom: 1em;} - -strong, b {font-weight: bold;} -em, i {font-style: italic;} - -/* Lists */ -ul { - list-style: outside disc; - margin: 0em 0 0 1.5em; -} - -ol { - list-style: outside decimal; - margin: 0em 0 0 1.5em; -} - -li { margin-top: 0.5em; - margin-bottom: 1em; } - -.post-info { - float:right; - margin:10px; - padding:5px; -} - -.post-info p{ - margin-top: 1px; - margin-bottom: 1px; -} - -.readmore { float: right } - -dl {margin: 0 0 1.5em 0;} -dt {font-weight: bold;} -dd {margin-left: 1.5em;} - -pre{background-color: rgb(238, 238, 238); padding: 10px; margin: 10px; overflow: auto;} - -/* Quotes */ -blockquote { - margin: 20px; - font-style: italic; -} -cite {} - -q {} - -div.note { - float: right; - margin: 5px; - font-size: 85%; - max-width: 300px; -} - -/* Tables */ -table {margin: .5em auto 1.5em auto; width: 98%;} - - /* Thead */ - thead th {padding: .5em .4em; text-align: left;} - thead td {} - - /* Tbody */ - tbody td {padding: .5em .4em;} - tbody th {} - - tbody .alt td {} - tbody .alt th {} - - /* Tfoot */ - tfoot th {} - tfoot td {} - -/* HTML5 tags */ -header, section, footer, -aside, nav, article, figure { - display: block; -} - -/***** Layout *****/ -.body {clear: both; margin: 0 auto; width: 800px;} -img.right, figure.right, div.figure.align-right { - float: right; - margin: 0 0 2em 2em; -} -img.left, figure.left, div.figure.align-left { - float: left; - margin: 0 2em 2em 0; -} - -/* .rst support */ -div.figure img, figure img { /* to fill figure exactly */ - width: 100%; -} -div.figure p.caption, figure p.caption { /* margin provided by figure */ - margin-top: 0; - margin-bottom: 0; -} - -/* - Header -*****************/ -#banner { - margin: 0 auto; - padding: 2.5em 0 0 0; -} - - /* Banner */ - #banner h1 {font-size: 3.571em; line-height: 0;} - #banner h1 a:link, #banner h1 a:visited { - color: #000305; - display: block; - font-weight: bold; - margin: 0 0 .6em .2em; - text-decoration: none; - } - #banner h1 a:hover, #banner h1 a:active { - background: none; - color: #C74350; - text-shadow: none; - } - - #banner h1 strong {font-size: 0.36em; font-weight: normal;} - - /* Main Nav */ - #banner nav { - background: #000305; - font-size: 1.143em; - height: 40px; - line-height: 30px; - margin: 0 auto 2em auto; - padding: 0; - text-align: center; - width: 800px; - - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - } - - #banner nav ul {list-style: none; margin: 0 auto; width: 800px;} - #banner nav li {float: left; display: inline; margin: 0;} - - #banner nav a:link, #banner nav a:visited { - color: #fff; - display: inline-block; - height: 30px; - padding: 5px 1.5em; - text-decoration: none; - } - #banner nav a:hover, #banner nav a:active, - #banner nav .active a:link, #banner nav .active a:visited { - background: #C74451; - color: #fff; - text-shadow: none !important; - } - - #banner nav li:first-child a { - border-top-left-radius: 5px; - -moz-border-radius-topleft: 5px; - -webkit-border-top-left-radius: 5px; - - border-bottom-left-radius: 5px; - -moz-border-radius-bottomleft: 5px; - -webkit-border-bottom-left-radius: 5px; - } - -/* - Featured -*****************/ -#featured { - background: #fff; - margin-bottom: 2em; - overflow: hidden; - padding: 20px; - width: 760px; - - border-radius: 10px; - -moz-border-radius: 10px; - -webkit-border-radius: 10px; -} - -#featured figure { - border: 2px solid #eee; - float: right; - margin: 0.786em 2em 0 5em; - width: 248px; -} -#featured figure img {display: block; float: right;} - -#featured h2 {color: #C74451; font-size: 1.714em; margin-bottom: 0.333em;} -#featured h3 {font-size: 1.429em; margin-bottom: .5em;} - -#featured h3 a:link, #featured h3 a:visited {color: #000305; text-decoration: none;} -#featured h3 a:hover, #featured h3 a:active {color: #fff;} - -/* - Body -*****************/ -#content { - background: #fff; - margin-bottom: 2em; - overflow: hidden; - padding: 20px 20px; - width: 760px; - - border-radius: 10px; - -moz-border-radius: 10px; - -webkit-border-radius: 10px; -} - -/* - Extras -*****************/ -#extras {margin: 0 auto 3em auto; overflow: hidden;} - -#extras ul {list-style: none; margin: 0;} -#extras li {border-bottom: 1px solid #fff;} -#extras h2 { - color: #C74350; - font-size: 1.429em; - margin-bottom: .25em; - padding: 0 3px; -} - -#extras a:link, #extras a:visited { - color: #444; - display: block; - border-bottom: 1px solid #F4E3E3; - text-decoration: none; - padding: .3em .25em; -} - -#extras a:hover, #extras a:active {color: #fff;} - - /* Blogroll */ - #extras .blogroll { - float: left; - width: 615px; - } - - #extras .blogroll li {float: left; margin: 0 20px 0 0; width: 185px;} - - /* Social */ - #extras .social { - float: right; - width: 175px; - } - - #extras div[class='social'] a { - background-repeat: no-repeat; - background-position: 3px 6px; - padding-left: 25px; - } - - /* Icons */ - .social a[href*='about.me'] {background-image: url('../images/icons/aboutme.png');} - .social a[href*='bitbucket.org'] {background-image: url('../images/icons/bitbucket.png');} - .social a[href*='delicious.com'] {background-image: url('../images/icons/delicious.png');} - .social a[href*='facebook.com'] {background-image: url('../images/icons/facebook.png');} - .social a[href*='gitorious.org'] {background-image: url('../images/icons/gitorious.png');} - .social a[href*='github.com'], - .social a[href*='git.io'] { - background-image: url('../images/icons/github.png'); - background-size: 16px 16px; - } - .social a[href*='gittip.com'] {background-image: url('../images/icons/gittip.png');} - .social a[href*='plus.google.com'] {background-image: url('../images/icons/google-plus.png');} - .social a[href*='groups.google.com'] {background-image: url('../images/icons/google-groups.png');} - .social a[href*='news.ycombinator.com'], - .social a[href*='hackernewsers.com'] {background-image: url('../images/icons/hackernews.png');} - .social a[href*='last.fm'], .social a[href*='lastfm.'] {background-image: url('../images/icons/lastfm.png');} - .social a[href*='linkedin.com'] {background-image: url('../images/icons/linkedin.png');} - .social a[href*='reddit.com'] {background-image: url('../images/icons/reddit.png');} - .social a[type$='atom+xml'], .social a[type$='rss+xml'] {background-image: url('../images/icons/rss.png');} - .social a[href*='slideshare.net'] {background-image: url('../images/icons/slideshare.png');} - .social a[href*='speakerdeck.com'] {background-image: url('../images/icons/speakerdeck.png');} - .social a[href*='stackoverflow.com'] {background-image: url('../images/icons/stackoverflow.png');} - .social a[href*='twitter.com'] {background-image: url('../images/icons/twitter.png');} - .social a[href*='vimeo.com'] {background-image: url('../images/icons/vimeo.png');} - .social a[href*='youtube.com'] {background-image: url('../images/icons/youtube.png');} - -/* - About -*****************/ -#about { - background: #fff; - font-style: normal; - margin-bottom: 2em; - overflow: hidden; - padding: 20px; - text-align: left; - width: 760px; - - border-radius: 10px; - -moz-border-radius: 10px; - -webkit-border-radius: 10px; -} - -#about .primary {float: left; width: 165px;} -#about .primary strong {color: #C64350; display: block; font-size: 1.286em;} -#about .photo {float: left; margin: 5px 20px;} - -#about .url:link, #about .url:visited {text-decoration: none;} - -#about .bio {float: right; width: 500px;} - -/* - Footer -*****************/ -#contentinfo {padding-bottom: 2em; text-align: right;} - -/***** Sections *****/ -/* Blog */ -.hentry { - display: block; - clear: both; - border-top: 1px solid #eee; - padding: 1.5em 0; -} -li:first-child .hentry, #content > .hentry {border: 0; margin: 0;} -#content > .hentry {padding: 1em 0;} -.hentry img{display : none ;} -.entry-title {font-size: 3em; margin-bottom: 10px; margin-top: 0;} -.entry-title a:link, .entry-title a:visited {text-decoration: none; color: #333;} -.entry-title a:visited {background-color: #fff;} - -.hentry .post-info * {font-style: normal;} - - /* Content */ - .hentry footer {margin-bottom: 2em;} - .hentry footer address {display: inline;} - #posts-list footer address {display: block;} - - /* Blog Index */ - #posts-list {list-style: none; margin: 0;} - #posts-list .hentry {padding-left: 10px; position: relative;} - - #posts-list footer { - left: 10px; - position: relative; - float: left; - top: 0.5em; - width: 190px; - } - - /* About the Author */ - #about-author { - background: #f9f9f9; - clear: both; - font-style: normal; - margin: 2em 0; - padding: 10px 20px 15px 20px; - - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - } - - #about-author strong { - color: #C64350; - clear: both; - display: block; - font-size: 1.429em; - } - - #about-author .photo {border: 1px solid #ddd; float: left; margin: 5px 1em 0 0;} - - /* Comments */ - #comments-list {list-style: none; margin: 0 1em;} - #comments-list blockquote { - background: #f8f8f8; - clear: both; - font-style: normal; - margin: 0; - padding: 15px 20px; - - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - } - #comments-list footer {color: #888; padding: .5em 1em 0 0; text-align: right;} - - #comments-list li:nth-child(2n) blockquote {background: #F5f5f5;} - - /* Add a Comment */ - #add-comment label {clear: left; float: left; text-align: left; width: 150px;} - #add-comment input[type='text'], - #add-comment input[type='email'], - #add-comment input[type='url'] {float: left; width: 200px;} - - #add-comment textarea {float: left; height: 150px; width: 495px;} - - #add-comment p.req {clear: both; margin: 0 .5em 1em 0; text-align: right;} - - #add-comment input[type='submit'] {float: right; margin: 0 .5em;} - #add-comment * {margin-bottom: .5em;} diff --git a/pelican/tests/output/basic/theme/css/pygment.css b/pelican/tests/output/basic/theme/css/pygment.css deleted file mode 100644 index fdd056f6..00000000 --- a/pelican/tests/output/basic/theme/css/pygment.css +++ /dev/null @@ -1,205 +0,0 @@ -.hll { -background-color:#eee; -} -.c { -color:#408090; -font-style:italic; -} -.err { -border:1px solid #FF0000; -} -.k { -color:#007020; -font-weight:bold; -} -.o { -color:#666666; -} -.cm { -color:#408090; -font-style:italic; -} -.cp { -color:#007020; -} -.c1 { -color:#408090; -font-style:italic; -} -.cs { -background-color:#FFF0F0; -color:#408090; -} -.gd { -color:#A00000; -} -.ge { -font-style:italic; -} -.gr { -color:#FF0000; -} -.gh { -color:#000080; -font-weight:bold; -} -.gi { -color:#00A000; -} -.go { -color:#303030; -} -.gp { -color:#C65D09; -font-weight:bold; -} -.gs { -font-weight:bold; -} -.gu { -color:#800080; -font-weight:bold; -} -.gt { -color:#0040D0; -} -.kc { -color:#007020; -font-weight:bold; -} -.kd { -color:#007020; -font-weight:bold; -} -.kn { -color:#007020; -font-weight:bold; -} -.kp { -color:#007020; -} -.kr { -color:#007020; -font-weight:bold; -} -.kt { -color:#902000; -} -.m { -color:#208050; -} -.s { -color:#4070A0; -} -.na { -color:#4070A0; -} -.nb { -color:#007020; -} -.nc { -color:#0E84B5; -font-weight:bold; -} -.no { -color:#60ADD5; -} -.nd { -color:#555555; -font-weight:bold; -} -.ni { -color:#D55537; -font-weight:bold; -} -.ne { -color:#007020; -} -.nf { -color:#06287E; -} -.nl { -color:#002070; -font-weight:bold; -} -.nn { -color:#0E84B5; -font-weight:bold; -} -.nt { -color:#062873; -font-weight:bold; -} -.nv { -color:#BB60D5; -} -.ow { -color:#007020; -font-weight:bold; -} -.w { -color:#BBBBBB; -} -.mf { -color:#208050; -} -.mh { -color:#208050; -} -.mi { -color:#208050; -} -.mo { -color:#208050; -} -.sb { -color:#4070A0; -} -.sc { -color:#4070A0; -} -.sd { -color:#4070A0; -font-style:italic; -} -.s2 { -color:#4070A0; -} -.se { -color:#4070A0; -font-weight:bold; -} -.sh { -color:#4070A0; -} -.si { -color:#70A0D0; -font-style:italic; -} -.sx { -color:#C65D09; -} -.sr { -color:#235388; -} -.s1 { -color:#4070A0; -} -.ss { -color:#517918; -} -.bp { -color:#007020; -} -.vc { -color:#BB60D5; -} -.vg { -color:#BB60D5; -} -.vi { -color:#BB60D5; -} -.il { -color:#208050; -} diff --git a/pelican/tests/output/basic/theme/css/reset.css b/pelican/tests/output/basic/theme/css/reset.css deleted file mode 100644 index c88e6196..00000000 --- a/pelican/tests/output/basic/theme/css/reset.css +++ /dev/null @@ -1,52 +0,0 @@ -/* - Name: Reset Stylesheet - Description: Resets browser's default CSS - Author: Eric Meyer - Author URI: https://meyerweb.com/eric/tools/css/reset/ -*/ - -/* v1.0 | 20080212 */ -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, font, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td { - background: transparent; - border: 0; - font-size: 100%; - margin: 0; - outline: 0; - padding: 0; - vertical-align: baseline; -} - -body {line-height: 1;} - -ol, ul {list-style: none;} - -blockquote, q {quotes: none;} - -blockquote:before, blockquote:after, -q:before, q:after { - content: ''; - content: none; -} - -/* remember to define focus styles! */ -:focus { - outline: 0; -} - -/* remember to highlight inserts somehow! */ -ins {text-decoration: none;} -del {text-decoration: line-through;} - -/* tables still need 'cellspacing="0"' in the markup */ -table { - border-collapse: collapse; - border-spacing: 0; -} \ No newline at end of file diff --git a/pelican/tests/output/basic/theme/css/typogrify.css b/pelican/tests/output/basic/theme/css/typogrify.css deleted file mode 100644 index 3bae4976..00000000 --- a/pelican/tests/output/basic/theme/css/typogrify.css +++ /dev/null @@ -1,3 +0,0 @@ -.caps {font-size:.92em;} -.amp {color:#666; font-size:1.05em;font-family:"Warnock Pro", "Goudy Old Style","Palatino","Book Antiqua",serif; font-style:italic;} -.dquo {margin-left:-.38em;} diff --git a/pelican/tests/output/basic/theme/css/wide.css b/pelican/tests/output/basic/theme/css/wide.css deleted file mode 100644 index 88fd59ce..00000000 --- a/pelican/tests/output/basic/theme/css/wide.css +++ /dev/null @@ -1,48 +0,0 @@ -@import url("main.css"); - -body { - font:1.3em/1.3 "Hoefler Text","Georgia",Georgia,serif,sans-serif; -} - -.post-info{ - display: none; -} - -#banner nav { - display: none; - -moz-border-radius: 0px; - margin-bottom: 20px; - overflow: hidden; - font-size: 1em; - background: #F5F4EF; -} - -#banner nav ul{ - padding-right: 50px; -} - -#banner nav li{ - float: right; - color: #000; -} - -#banner nav li a { - color: #000; -} - -#banner h1 { - margin-bottom: -18px; -} - -#featured, #extras { - padding: 50px; -} - -#featured { - padding-top: 20px; -} - -#extras { - padding-top: 0px; - padding-bottom: 0px; -} diff --git a/pelican/tests/output/basic/theme/fonts/Yanone_Kaffeesatz_400.eot b/pelican/tests/output/basic/theme/fonts/Yanone_Kaffeesatz_400.eot deleted file mode 100644 index b3b90dbc..00000000 Binary files a/pelican/tests/output/basic/theme/fonts/Yanone_Kaffeesatz_400.eot and /dev/null differ diff --git a/pelican/tests/output/basic/theme/fonts/Yanone_Kaffeesatz_400.svg b/pelican/tests/output/basic/theme/fonts/Yanone_Kaffeesatz_400.svg deleted file mode 100644 index a69669b5..00000000 --- a/pelican/tests/output/basic/theme/fonts/Yanone_Kaffeesatz_400.svg +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pelican/tests/output/basic/theme/fonts/Yanone_Kaffeesatz_400.ttf b/pelican/tests/output/basic/theme/fonts/Yanone_Kaffeesatz_400.ttf deleted file mode 100644 index 6f4feb02..00000000 Binary files a/pelican/tests/output/basic/theme/fonts/Yanone_Kaffeesatz_400.ttf and /dev/null differ diff --git a/pelican/tests/output/basic/theme/fonts/Yanone_Kaffeesatz_400.woff b/pelican/tests/output/basic/theme/fonts/Yanone_Kaffeesatz_400.woff deleted file mode 100644 index ddccf765..00000000 Binary files a/pelican/tests/output/basic/theme/fonts/Yanone_Kaffeesatz_400.woff and /dev/null differ diff --git a/pelican/tests/output/basic/theme/fonts/Yanone_Kaffeesatz_400.woff2 b/pelican/tests/output/basic/theme/fonts/Yanone_Kaffeesatz_400.woff2 deleted file mode 100644 index 7b18f7ea..00000000 Binary files a/pelican/tests/output/basic/theme/fonts/Yanone_Kaffeesatz_400.woff2 and /dev/null differ diff --git a/pelican/tests/output/basic/theme/fonts/font.css b/pelican/tests/output/basic/theme/fonts/font.css deleted file mode 100644 index a9eb87e6..00000000 --- a/pelican/tests/output/basic/theme/fonts/font.css +++ /dev/null @@ -1,12 +0,0 @@ -@font-face { - font-family: 'Yanone Kaffeesatz'; - font-style: normal; - font-weight: 400; - src: - local('Yanone Kaffeesatz Regular'), - local('YanoneKaffeesatz-Regular'), - /* from https://fonts.gstatic.com/s/yanonekaffeesatz/v8/YDAoLskQQ5MOAgvHUQCcLRTHiN2BPBirwIkMLKUspj4.woff */ - url('Yanone_Kaffeesatz_400.woff') format('woff'), - /* from https://fonts.gstatic.com/s/yanonekaffeesatz/v8/YDAoLskQQ5MOAgvHUQCcLfGwxTS8d1Q9KiDNCMKLFUM.woff2 */ - url('Yanone_Kaffeesatz_400.woff2') format('woff2'); -} diff --git a/pelican/tests/output/basic/theme/images/icons/aboutme.png b/pelican/tests/output/basic/theme/images/icons/aboutme.png deleted file mode 100644 index 600110f2..00000000 Binary files a/pelican/tests/output/basic/theme/images/icons/aboutme.png and /dev/null differ diff --git a/pelican/tests/output/basic/theme/images/icons/bitbucket.png b/pelican/tests/output/basic/theme/images/icons/bitbucket.png deleted file mode 100644 index 277a7dfb..00000000 Binary files a/pelican/tests/output/basic/theme/images/icons/bitbucket.png and /dev/null differ diff --git a/pelican/tests/output/basic/theme/images/icons/delicious.png b/pelican/tests/output/basic/theme/images/icons/delicious.png deleted file mode 100644 index 34868c5c..00000000 Binary files a/pelican/tests/output/basic/theme/images/icons/delicious.png and /dev/null differ diff --git a/pelican/tests/output/basic/theme/images/icons/facebook.png b/pelican/tests/output/basic/theme/images/icons/facebook.png deleted file mode 100644 index 1d8a4327..00000000 Binary files a/pelican/tests/output/basic/theme/images/icons/facebook.png and /dev/null differ diff --git a/pelican/tests/output/basic/theme/images/icons/github.png b/pelican/tests/output/basic/theme/images/icons/github.png deleted file mode 100644 index 5d9109de..00000000 Binary files a/pelican/tests/output/basic/theme/images/icons/github.png and /dev/null differ diff --git a/pelican/tests/output/basic/theme/images/icons/gitorious.png b/pelican/tests/output/basic/theme/images/icons/gitorious.png deleted file mode 100644 index a6705d0f..00000000 Binary files a/pelican/tests/output/basic/theme/images/icons/gitorious.png and /dev/null differ diff --git a/pelican/tests/output/basic/theme/images/icons/gittip.png b/pelican/tests/output/basic/theme/images/icons/gittip.png deleted file mode 100644 index b9f67aaa..00000000 Binary files a/pelican/tests/output/basic/theme/images/icons/gittip.png and /dev/null differ diff --git a/pelican/tests/output/basic/theme/images/icons/google-groups.png b/pelican/tests/output/basic/theme/images/icons/google-groups.png deleted file mode 100644 index bbd0a0fd..00000000 Binary files a/pelican/tests/output/basic/theme/images/icons/google-groups.png and /dev/null differ diff --git a/pelican/tests/output/basic/theme/images/icons/google-plus.png b/pelican/tests/output/basic/theme/images/icons/google-plus.png deleted file mode 100644 index f8553d45..00000000 Binary files a/pelican/tests/output/basic/theme/images/icons/google-plus.png and /dev/null differ diff --git a/pelican/tests/output/basic/theme/images/icons/hackernews.png b/pelican/tests/output/basic/theme/images/icons/hackernews.png deleted file mode 100644 index 8e05e3ee..00000000 Binary files a/pelican/tests/output/basic/theme/images/icons/hackernews.png and /dev/null differ diff --git a/pelican/tests/output/basic/theme/images/icons/lastfm.png b/pelican/tests/output/basic/theme/images/icons/lastfm.png deleted file mode 100644 index 2eedd2da..00000000 Binary files a/pelican/tests/output/basic/theme/images/icons/lastfm.png and /dev/null differ diff --git a/pelican/tests/output/basic/theme/images/icons/linkedin.png b/pelican/tests/output/basic/theme/images/icons/linkedin.png deleted file mode 100644 index 06a88016..00000000 Binary files a/pelican/tests/output/basic/theme/images/icons/linkedin.png and /dev/null differ diff --git a/pelican/tests/output/basic/theme/images/icons/reddit.png b/pelican/tests/output/basic/theme/images/icons/reddit.png deleted file mode 100644 index d826d3e7..00000000 Binary files a/pelican/tests/output/basic/theme/images/icons/reddit.png and /dev/null differ diff --git a/pelican/tests/output/basic/theme/images/icons/rss.png b/pelican/tests/output/basic/theme/images/icons/rss.png deleted file mode 100644 index 12448f53..00000000 Binary files a/pelican/tests/output/basic/theme/images/icons/rss.png and /dev/null differ diff --git a/pelican/tests/output/basic/theme/images/icons/slideshare.png b/pelican/tests/output/basic/theme/images/icons/slideshare.png deleted file mode 100644 index 9cbe8588..00000000 Binary files a/pelican/tests/output/basic/theme/images/icons/slideshare.png and /dev/null differ diff --git a/pelican/tests/output/basic/theme/images/icons/speakerdeck.png b/pelican/tests/output/basic/theme/images/icons/speakerdeck.png deleted file mode 100644 index 7281ec48..00000000 Binary files a/pelican/tests/output/basic/theme/images/icons/speakerdeck.png and /dev/null differ diff --git a/pelican/tests/output/basic/theme/images/icons/stackoverflow.png b/pelican/tests/output/basic/theme/images/icons/stackoverflow.png deleted file mode 100644 index 3c6862e9..00000000 Binary files a/pelican/tests/output/basic/theme/images/icons/stackoverflow.png and /dev/null differ diff --git a/pelican/tests/output/basic/theme/images/icons/twitter.png b/pelican/tests/output/basic/theme/images/icons/twitter.png deleted file mode 100644 index cef1cef9..00000000 Binary files a/pelican/tests/output/basic/theme/images/icons/twitter.png and /dev/null differ diff --git a/pelican/tests/output/basic/theme/images/icons/vimeo.png b/pelican/tests/output/basic/theme/images/icons/vimeo.png deleted file mode 100644 index 4b9d7212..00000000 Binary files a/pelican/tests/output/basic/theme/images/icons/vimeo.png and /dev/null differ diff --git a/pelican/tests/output/basic/theme/images/icons/youtube.png b/pelican/tests/output/basic/theme/images/icons/youtube.png deleted file mode 100644 index e334e68e..00000000 Binary files a/pelican/tests/output/basic/theme/images/icons/youtube.png and /dev/null differ diff --git a/pelican/tests/output/basic/this-is-a-super-article.html b/pelican/tests/output/basic/this-is-a-super-article.html deleted file mode 100644 index bd1472e4..00000000 --- a/pelican/tests/output/basic/this-is-a-super-article.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - This is a super article ! - - - - - - - -
    -
    -
    -

    - This is a super article !

    -
    - -
    -

    Some content here !

    -
    -

    This is a simple title

    -

    And here comes the cool stuff.

    -alternate text -alternate text -
    ->>> from ipdb import set_trace
    ->>> set_trace()
    -
    -

    → And now try with some utf8 hell: ééé

    -
    - -
    - -
    -
    -
    - -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/basic/unbelievable.html b/pelican/tests/output/basic/unbelievable.html deleted file mode 100644 index 33e0ad53..00000000 --- a/pelican/tests/output/basic/unbelievable.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - Unbelievable ! - - - - - - - -
    -
    -
    -

    - Unbelievable !

    -
    - -
    -
    - - Published: Fri 15 October 2010 - - -

    In misc.

    - -

    Or completely awesome. Depends the needs.

    -

    a root-relative link to markdown-article -a file-relative link to markdown-article

    -
    -

    Testing sourcecode directive

    -
    1
    formatter = self.options and VARIANTS[self.options.keys()[0]]
    -
    -
    -
    -

    Testing another case

    -

    This will now have a line number in 'custom' since it's the default in -pelican.conf, it will have nothing in default.

    -
    formatter = self.options and VARIANTS[self.options.keys()[0]]
    -
    -

    Lovely.

    -
    -
    -

    Testing more sourcecode directives

    -
     8def run(self):
    self.assert_has_content()
    10 try:
    lexer = get_lexer_by_name(self.arguments[0])
    12 except ValueError:
    # no lexer found - use the text one instead of an exception
    14 lexer = TextLexer()

    16 if ('linenos' in self.options and
    self.options['linenos'] not in ('table', 'inline')):
    18 self.options['linenos'] = 'table'

    20 for flag in ('nowrap', 'nobackground', 'anchorlinenos'):
    if flag in self.options:
    22 self.options[flag] = True

    24 # noclasses should already default to False, but just in case...
    formatter = HtmlFormatter(noclasses=False, **self.options)
    26 parsed = highlight('\n'.join(self.content), lexer, formatter)
    return [nodes.raw('', parsed, format='html')]
    -

    Lovely.

    -
    -
    -

    Testing even more sourcecode directives

    -formatter = self.options and VARIANTS[self.options.keys()[0]] -

    Lovely.

    -
    -
    -

    Testing overriding config defaults

    -

    Even if the default is line numbers, we can override it here

    -
    formatter = self.options and VARIANTS[self.options.keys()[0]]
    -
    -

    Lovely.

    -
    - -
    - -
    -
    -
    - -
    - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/a-markdown-powered-article.html b/pelican/tests/output/custom/a-markdown-powered-article.html deleted file mode 100644 index 00aa18e8..00000000 --- a/pelican/tests/output/custom/a-markdown-powered-article.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - A markdown powered article - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - A markdown powered article

    -
    - -
    -

    You're mutually oblivious.

    -

    a root-relative link to unbelievable -a file-relative link to unbelievable

    -
    -
    -

    Comments !

    -
    - - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/archives.html b/pelican/tests/output/custom/archives.html deleted file mode 100644 index 1e9a8377..00000000 --- a/pelican/tests/output/custom/archives.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - Alexis' log - - - - - - - -Fork me on GitHub - - -
    -

    Archives for Alexis' log

    - -
    -
    Fri 30 November 2012
    -
    FILENAME_METADATA example
    -
    Wed 29 February 2012
    -
    Second article
    -
    Wed 20 April 2011
    -
    A markdown powered article
    -
    Thu 17 February 2011
    -
    Article 1
    -
    Thu 17 February 2011
    -
    Article 2
    -
    Thu 17 February 2011
    -
    Article 3
    -
    Thu 02 December 2010
    -
    This is a super article !
    -
    Wed 20 October 2010
    -
    Oh yeah !
    -
    Fri 15 October 2010
    -
    Unbelievable !
    -
    Sun 14 March 2010
    -
    The baz tag
    -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/article-1.html b/pelican/tests/output/custom/article-1.html deleted file mode 100644 index cc15ba5c..00000000 --- a/pelican/tests/output/custom/article-1.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - Article 1 - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - Article 1

    -
    - -
    -

    Article 1

    - -
    -
    -

    Comments !

    -
    - - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/article-2.html b/pelican/tests/output/custom/article-2.html deleted file mode 100644 index cc331a4d..00000000 --- a/pelican/tests/output/custom/article-2.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - Article 2 - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - Article 2

    -
    - -
    -

    Article 2

    - -
    -
    -

    Comments !

    -
    - - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/article-3.html b/pelican/tests/output/custom/article-3.html deleted file mode 100644 index 8b180180..00000000 --- a/pelican/tests/output/custom/article-3.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - Article 3 - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - Article 3

    -
    - -
    -

    Article 3

    - -
    -
    -

    Comments !

    -
    - - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/author/alexis-metaireau.html b/pelican/tests/output/custom/author/alexis-metaireau.html deleted file mode 100644 index f768b15e..00000000 --- a/pelican/tests/output/custom/author/alexis-metaireau.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - Alexis' log - Alexis Métaireau - - - - - - - -Fork me on GitHub - - - - -
    -

    Other articles

    -
    -
      - -
    1. - -
    2. - -
    3. -
    -

    - Page 1 / 3 - » - -

    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/author/alexis-metaireau2.html b/pelican/tests/output/custom/author/alexis-metaireau2.html deleted file mode 100644 index 96b34bff..00000000 --- a/pelican/tests/output/custom/author/alexis-metaireau2.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - Alexis' log - Alexis Métaireau - - - - - - - -Fork me on GitHub - - - -
    -
      -
    1. - -
    2. - -
    3. - -
    4. -
      -

      Oh yeah !

      -
      - -
      -
      -

      Why not ?

      -

      After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !

      -alternate text -
      - - read more -

      There are comments.

      -
    5. -
    -

    - - « - Page 2 / 3 - » - -

    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/author/alexis-metaireau3.html b/pelican/tests/output/custom/author/alexis-metaireau3.html deleted file mode 100644 index 407c1a51..00000000 --- a/pelican/tests/output/custom/author/alexis-metaireau3.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - Alexis' log - Alexis Métaireau - - - - - - - -Fork me on GitHub - - - -
    -
      -
    1. - -
    2. -
    -

    - - « - Page 3 / 3 -

    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/authors.html b/pelican/tests/output/custom/authors.html deleted file mode 100644 index 6374c4a4..00000000 --- a/pelican/tests/output/custom/authors.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - Alexis' log - Authors - - - - - - - -Fork me on GitHub - - - -
    -

    Authors on Alexis' log

    - -
    - -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/categories.html b/pelican/tests/output/custom/categories.html deleted file mode 100644 index 393aef32..00000000 --- a/pelican/tests/output/custom/categories.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - Alexis' log - Categories - - - - - - - -Fork me on GitHub - - -

    Categories on Alexis' log

    - -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/category/bar.html b/pelican/tests/output/custom/category/bar.html deleted file mode 100644 index 4511bcb6..00000000 --- a/pelican/tests/output/custom/category/bar.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - Alexis' log - bar - - - - - - - -Fork me on GitHub - - - - -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/category/cat1.html b/pelican/tests/output/custom/category/cat1.html deleted file mode 100644 index dc5c0579..00000000 --- a/pelican/tests/output/custom/category/cat1.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - Alexis' log - cat1 - - - - - - - -Fork me on GitHub - - - - -
    -

    Other articles

    -
    -
      - -
    1. - -
    2. - -
    3. -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/category/misc.html b/pelican/tests/output/custom/category/misc.html deleted file mode 100644 index 053599ed..00000000 --- a/pelican/tests/output/custom/category/misc.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - Alexis' log - misc - - - - - - - -Fork me on GitHub - - - - -
    -

    Other articles

    -
    -
      - -
    1. - -
    2. - -
    3. -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/category/yeah.html b/pelican/tests/output/custom/category/yeah.html deleted file mode 100644 index 17e8103e..00000000 --- a/pelican/tests/output/custom/category/yeah.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - Alexis' log - yeah - - - - - - - -Fork me on GitHub - - - - -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/drafts/a-draft-article-without-date.html b/pelican/tests/output/custom/drafts/a-draft-article-without-date.html deleted file mode 100644 index 03aecc56..00000000 --- a/pelican/tests/output/custom/drafts/a-draft-article-without-date.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - A draft article without date - - - - - - - - -Fork me on GitHub - - -
    - -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/drafts/a-draft-article.html b/pelican/tests/output/custom/drafts/a-draft-article.html deleted file mode 100644 index 87be8bec..00000000 --- a/pelican/tests/output/custom/drafts/a-draft-article.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - A draft article - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - A draft article

    -
    - -
    -

    This is a draft article, it should live under the /drafts/ folder and not be -listed anywhere else.

    - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/feeds/alexis-metaireau.atom.xml b/pelican/tests/output/custom/feeds/alexis-metaireau.atom.xml deleted file mode 100644 index a9aa4d38..00000000 --- a/pelican/tests/output/custom/feeds/alexis-metaireau.atom.xml +++ /dev/null @@ -1,74 +0,0 @@ - -Alexis' log - Alexis Métaireauhttp://blog.notmyidea.org/2013-11-17T23:29:00+01:00A personal blog.FILENAME_METADATA example2012-11-30T00:00:00+01:002012-11-30T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2012-11-30:/filename_metadata-example.html<p>Some cool stuff!</p> -Second article2012-02-29T00:00:00+01:002012-02-29T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2012-02-29:/second-article.html<p>This is some article, in english</p> -A markdown powered article2011-04-20T00:00:00+02:002011-04-20T00:00:00+02:00Alexis Métaireautag:blog.notmyidea.org,2011-04-20:/a-markdown-powered-article.html<p>You're mutually oblivious.</p> -<p><a href="http://blog.notmyidea.org/unbelievable.html">a root-relative link to unbelievable</a> -<a href="http://blog.notmyidea.org/unbelievable.html">a file-relative link to unbelievable</a></p>Article 12011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/article-1.html<p>Article 1</p> -Article 22011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/article-2.html<p>Article 2</p> -Article 32011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/article-3.html<p>Article 3</p> -This is a super article !2010-12-02T10:14:00+01:002013-11-17T23:29:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-12-02:/this-is-a-super-article.html<p class="first last">Multi-line metadata should be supported -as well as <strong>inline markup</strong>.</p> -<p>Some content here !</p> -<div class="section" id="this-is-a-simple-title"> -<h2>This is a simple title</h2> -<p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /> -<pre class="literal-block"> -&gt;&gt;&gt; from ipdb import set_trace -&gt;&gt;&gt; set_trace() -</pre> -<p>→ And now try with some utf8 hell: ééé</p> -</div> -Oh yeah !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/oh-yeah.html<div class="section" id="why-not"> -<h2>Why not ?</h2> -<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !</p> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> -Unbelievable !2010-10-15T20:30:00+02:002010-10-15T20:30:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-15:/unbelievable.html<p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a> -<a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div><p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a> -<a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will have nothing in default.</p> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table><p>Lovely.</p> -</div> -<div class="section" id="testing-more-sourcecode-directives"> -<h2>Testing more sourcecode directives</h2> -<div class="highlight"><pre><span></span><span id="foo-8"><a name="foo-8"></a><a href="#foo-8"><span class="linenos special"> 8</span></a><span class="testingk">def</span> <span class="testingnf">run</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingp">):</span><br></span><span id="foo-9"><a name="foo-9"></a><a href="#foo-9"><span class="linenos"> </span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">assert_has_content</span><span class="testingp">()</span><br></span><span id="foo-10"><a name="foo-10"></a><a href="#foo-10"><span class="linenos special">10</span></a> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a name="foo-11"></a><a href="#foo-11"><span class="linenos"> </span></a> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">get_lexer_by_name</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">arguments</span><span class="testingp">[</span><span class="testingmi">0</span><span class="testingp">])</span><br></span><span id="foo-12"><a name="foo-12"></a><a href="#foo-12"><span class="linenos special">12</span></a> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a name="foo-13"></a><a href="#foo-13"><span class="linenos"> </span></a> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a name="foo-14"></a><a href="#foo-14"><span class="linenos special">14</span></a> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">TextLexer</span><span class="testingp">()</span><br></span><span id="foo-15"><a name="foo-15"></a><a href="#foo-15"><span class="linenos"> </span></a><br></span><span id="foo-16"><a name="foo-16"></a><a href="#foo-16"><span class="linenos special">16</span></a> <span class="testingk">if</span> <span class="testingp">(</span><span class="testings1">&#39;linenos&#39;</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span> <span class="testingow">and</span><br></span><span id="foo-17"><a name="foo-17"></a><a href="#foo-17"><span class="linenos"> </span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingow">not</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;table&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;inline&#39;</span><span class="testingp">)):</span><br></span><span id="foo-18"><a name="foo-18"></a><a href="#foo-18"><span class="linenos special">18</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testings1">&#39;table&#39;</span><br></span><span id="foo-19"><a name="foo-19"></a><a href="#foo-19"><span class="linenos"> </span></a><br></span><span id="foo-20"><a name="foo-20"></a><a href="#foo-20"><span class="linenos special">20</span></a> <span class="testingk">for</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;nowrap&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;nobackground&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;anchorlinenos&#39;</span><span class="testingp">):</span><br></span><span id="foo-21"><a name="foo-21"></a><a href="#foo-21"><span class="linenos"> </span></a> <span class="testingk">if</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">:</span><br></span><span id="foo-22"><a name="foo-22"></a><a href="#foo-22"><span class="linenos special">22</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testingn">flag</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testingkc">True</span><br></span><span id="foo-23"><a name="foo-23"></a><a href="#foo-23"><span class="linenos"> </span></a><br></span><span id="foo-24"><a name="foo-24"></a><a href="#foo-24"><span class="linenos special">24</span></a> <span class="testingc1"># noclasses should already default to False, but just in case...</span><br></span><span id="foo-25"><a name="foo-25"></a><a href="#foo-25"><span class="linenos"> </span></a> <span class="testingn">formatter</span> <span class="testingo">=</span> <span class="testingn">HtmlFormatter</span><span class="testingp">(</span><span class="testingn">noclasses</span><span class="testingo">=</span><span class="testingkc">False</span><span class="testingp">,</span> <span class="testingo">**</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">)</span><br></span><span id="foo-26"><a name="foo-26"></a><a href="#foo-26"><span class="linenos special">26</span></a> <span class="testingn">parsed</span> <span class="testingo">=</span> <span class="testingn">highlight</span><span class="testingp">(</span><span class="testings1">&#39;</span><span class="testingse">\n</span><span class="testings1">&#39;</span><span class="testingo">.</span><span class="testingn">join</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">content</span><span class="testingp">),</span> <span class="testingn">lexer</span><span class="testingp">,</span> <span class="testingn">formatter</span><span class="testingp">)</span><br></span><span id="foo-27"><a name="foo-27"></a><a href="#foo-27"><span class="linenos"> </span></a> <span class="testingk">return</span> <span class="testingp">[</span><span class="testingn">nodes</span><span class="testingo">.</span><span class="testingn">raw</span><span class="testingp">(</span><span class="testings1">&#39;&#39;</span><span class="testingp">,</span> <span class="testingn">parsed</span><span class="testingp">,</span> <span class="testingnb">format</span><span class="testingo">=</span><span class="testings1">&#39;html&#39;</span><span class="testingp">)]</span><br></span></pre></div> -<p>Lovely.</p> -</div> -<div class="section" id="testing-even-more-sourcecode-directives"> -<h2>Testing even more sourcecode directives</h2> -<span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -<p>Lovely.</p> -</div> -<div class="section" id="testing-overriding-config-defaults"> -<h2>Testing overriding config defaults</h2> -<p>Even if the default is line numbers, we can override it here</p> -<div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -<p>Lovely.</p> -</div> -The baz tag2010-03-14T00:00:00+01:002010-03-14T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-03-14:/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> - \ No newline at end of file diff --git a/pelican/tests/output/custom/feeds/alexis-metaireau.rss.xml b/pelican/tests/output/custom/feeds/alexis-metaireau.rss.xml deleted file mode 100644 index 1ea22155..00000000 --- a/pelican/tests/output/custom/feeds/alexis-metaireau.rss.xml +++ /dev/null @@ -1,29 +0,0 @@ - -Alexis' log - Alexis Métaireauhttp://blog.notmyidea.org/A personal blog.Sun, 17 Nov 2013 23:29:00 +0100FILENAME_METADATA examplehttp://blog.notmyidea.org/filename_metadata-example.html<p>Some cool stuff!</p> -Alexis MétaireauFri, 30 Nov 2012 00:00:00 +0100tag:blog.notmyidea.org,2012-11-30:/filename_metadata-example.htmlmiscSecond articlehttp://blog.notmyidea.org/second-article.html<p>This is some article, in english</p> -Alexis MétaireauWed, 29 Feb 2012 00:00:00 +0100tag:blog.notmyidea.org,2012-02-29:/second-article.htmlmiscfoobarbazA markdown powered articlehttp://blog.notmyidea.org/a-markdown-powered-article.html<p>You're mutually oblivious.</p> -<p><a href="http://blog.notmyidea.org/unbelievable.html">a root-relative link to unbelievable</a> -<a href="http://blog.notmyidea.org/unbelievable.html">a file-relative link to unbelievable</a></p>Alexis MétaireauWed, 20 Apr 2011 00:00:00 +0200tag:blog.notmyidea.org,2011-04-20:/a-markdown-powered-article.htmlcat1Article 1http://blog.notmyidea.org/article-1.html<p>Article 1</p> -Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/article-1.htmlcat1Article 2http://blog.notmyidea.org/article-2.html<p>Article 2</p> -Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/article-2.htmlcat1Article 3http://blog.notmyidea.org/article-3.html<p>Article 3</p> -Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/article-3.htmlcat1This is a super article !http://blog.notmyidea.org/this-is-a-super-article.html<p class="first last">Multi-line metadata should be supported -as well as <strong>inline markup</strong>.</p> -Alexis MétaireauThu, 02 Dec 2010 10:14:00 +0100tag:blog.notmyidea.org,2010-12-02:/this-is-a-super-article.htmlyeahfoobarfoobarOh yeah !http://blog.notmyidea.org/oh-yeah.html<div class="section" id="why-not"> -<h2>Why not ?</h2> -<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !</p> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> -Alexis MétaireauWed, 20 Oct 2010 10:14:00 +0200tag:blog.notmyidea.org,2010-10-20:/oh-yeah.htmlbarohbaryeahUnbelievable !http://blog.notmyidea.org/unbelievable.html<p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a> -<a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div>Alexis MétaireauFri, 15 Oct 2010 20:30:00 +0200tag:blog.notmyidea.org,2010-10-15:/unbelievable.htmlmiscThe baz taghttp://blog.notmyidea.org/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> -Alexis MétaireauSun, 14 Mar 2010 00:00:00 +0100tag:blog.notmyidea.org,2010-03-14:/tag/baz.htmlmisc \ No newline at end of file diff --git a/pelican/tests/output/custom/feeds/all-en.atom.xml b/pelican/tests/output/custom/feeds/all-en.atom.xml deleted file mode 100644 index 3054a950..00000000 --- a/pelican/tests/output/custom/feeds/all-en.atom.xml +++ /dev/null @@ -1,74 +0,0 @@ - -Alexis' loghttp://blog.notmyidea.org/2013-11-17T23:29:00+01:00A personal blog.FILENAME_METADATA example2012-11-30T00:00:00+01:002012-11-30T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2012-11-30:/filename_metadata-example.html<p>Some cool stuff!</p> -Second article2012-02-29T00:00:00+01:002012-02-29T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2012-02-29:/second-article.html<p>This is some article, in english</p> -A markdown powered article2011-04-20T00:00:00+02:002011-04-20T00:00:00+02:00Alexis Métaireautag:blog.notmyidea.org,2011-04-20:/a-markdown-powered-article.html<p>You're mutually oblivious.</p> -<p><a href="http://blog.notmyidea.org/unbelievable.html">a root-relative link to unbelievable</a> -<a href="http://blog.notmyidea.org/unbelievable.html">a file-relative link to unbelievable</a></p>Article 12011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/article-1.html<p>Article 1</p> -Article 22011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/article-2.html<p>Article 2</p> -Article 32011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/article-3.html<p>Article 3</p> -This is a super article !2010-12-02T10:14:00+01:002013-11-17T23:29:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-12-02:/this-is-a-super-article.html<p class="first last">Multi-line metadata should be supported -as well as <strong>inline markup</strong>.</p> -<p>Some content here !</p> -<div class="section" id="this-is-a-simple-title"> -<h2>This is a simple title</h2> -<p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /> -<pre class="literal-block"> -&gt;&gt;&gt; from ipdb import set_trace -&gt;&gt;&gt; set_trace() -</pre> -<p>→ And now try with some utf8 hell: ééé</p> -</div> -Oh yeah !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/oh-yeah.html<div class="section" id="why-not"> -<h2>Why not ?</h2> -<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !</p> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> -Unbelievable !2010-10-15T20:30:00+02:002010-10-15T20:30:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-15:/unbelievable.html<p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a> -<a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div><p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a> -<a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will have nothing in default.</p> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table><p>Lovely.</p> -</div> -<div class="section" id="testing-more-sourcecode-directives"> -<h2>Testing more sourcecode directives</h2> -<div class="highlight"><pre><span></span><span id="foo-8"><a name="foo-8"></a><a href="#foo-8"><span class="linenos special"> 8</span></a><span class="testingk">def</span> <span class="testingnf">run</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingp">):</span><br></span><span id="foo-9"><a name="foo-9"></a><a href="#foo-9"><span class="linenos"> </span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">assert_has_content</span><span class="testingp">()</span><br></span><span id="foo-10"><a name="foo-10"></a><a href="#foo-10"><span class="linenos special">10</span></a> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a name="foo-11"></a><a href="#foo-11"><span class="linenos"> </span></a> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">get_lexer_by_name</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">arguments</span><span class="testingp">[</span><span class="testingmi">0</span><span class="testingp">])</span><br></span><span id="foo-12"><a name="foo-12"></a><a href="#foo-12"><span class="linenos special">12</span></a> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a name="foo-13"></a><a href="#foo-13"><span class="linenos"> </span></a> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a name="foo-14"></a><a href="#foo-14"><span class="linenos special">14</span></a> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">TextLexer</span><span class="testingp">()</span><br></span><span id="foo-15"><a name="foo-15"></a><a href="#foo-15"><span class="linenos"> </span></a><br></span><span id="foo-16"><a name="foo-16"></a><a href="#foo-16"><span class="linenos special">16</span></a> <span class="testingk">if</span> <span class="testingp">(</span><span class="testings1">&#39;linenos&#39;</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span> <span class="testingow">and</span><br></span><span id="foo-17"><a name="foo-17"></a><a href="#foo-17"><span class="linenos"> </span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingow">not</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;table&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;inline&#39;</span><span class="testingp">)):</span><br></span><span id="foo-18"><a name="foo-18"></a><a href="#foo-18"><span class="linenos special">18</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testings1">&#39;table&#39;</span><br></span><span id="foo-19"><a name="foo-19"></a><a href="#foo-19"><span class="linenos"> </span></a><br></span><span id="foo-20"><a name="foo-20"></a><a href="#foo-20"><span class="linenos special">20</span></a> <span class="testingk">for</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;nowrap&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;nobackground&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;anchorlinenos&#39;</span><span class="testingp">):</span><br></span><span id="foo-21"><a name="foo-21"></a><a href="#foo-21"><span class="linenos"> </span></a> <span class="testingk">if</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">:</span><br></span><span id="foo-22"><a name="foo-22"></a><a href="#foo-22"><span class="linenos special">22</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testingn">flag</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testingkc">True</span><br></span><span id="foo-23"><a name="foo-23"></a><a href="#foo-23"><span class="linenos"> </span></a><br></span><span id="foo-24"><a name="foo-24"></a><a href="#foo-24"><span class="linenos special">24</span></a> <span class="testingc1"># noclasses should already default to False, but just in case...</span><br></span><span id="foo-25"><a name="foo-25"></a><a href="#foo-25"><span class="linenos"> </span></a> <span class="testingn">formatter</span> <span class="testingo">=</span> <span class="testingn">HtmlFormatter</span><span class="testingp">(</span><span class="testingn">noclasses</span><span class="testingo">=</span><span class="testingkc">False</span><span class="testingp">,</span> <span class="testingo">**</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">)</span><br></span><span id="foo-26"><a name="foo-26"></a><a href="#foo-26"><span class="linenos special">26</span></a> <span class="testingn">parsed</span> <span class="testingo">=</span> <span class="testingn">highlight</span><span class="testingp">(</span><span class="testings1">&#39;</span><span class="testingse">\n</span><span class="testings1">&#39;</span><span class="testingo">.</span><span class="testingn">join</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">content</span><span class="testingp">),</span> <span class="testingn">lexer</span><span class="testingp">,</span> <span class="testingn">formatter</span><span class="testingp">)</span><br></span><span id="foo-27"><a name="foo-27"></a><a href="#foo-27"><span class="linenos"> </span></a> <span class="testingk">return</span> <span class="testingp">[</span><span class="testingn">nodes</span><span class="testingo">.</span><span class="testingn">raw</span><span class="testingp">(</span><span class="testings1">&#39;&#39;</span><span class="testingp">,</span> <span class="testingn">parsed</span><span class="testingp">,</span> <span class="testingnb">format</span><span class="testingo">=</span><span class="testings1">&#39;html&#39;</span><span class="testingp">)]</span><br></span></pre></div> -<p>Lovely.</p> -</div> -<div class="section" id="testing-even-more-sourcecode-directives"> -<h2>Testing even more sourcecode directives</h2> -<span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -<p>Lovely.</p> -</div> -<div class="section" id="testing-overriding-config-defaults"> -<h2>Testing overriding config defaults</h2> -<p>Even if the default is line numbers, we can override it here</p> -<div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -<p>Lovely.</p> -</div> -The baz tag2010-03-14T00:00:00+01:002010-03-14T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-03-14:/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> - \ No newline at end of file diff --git a/pelican/tests/output/custom/feeds/all-fr.atom.xml b/pelican/tests/output/custom/feeds/all-fr.atom.xml deleted file mode 100644 index 39565ca6..00000000 --- a/pelican/tests/output/custom/feeds/all-fr.atom.xml +++ /dev/null @@ -1,4 +0,0 @@ - -Alexis' loghttp://blog.notmyidea.org/2012-02-29T00:00:00+01:00A personal blog.Deuxième article2012-02-29T00:00:00+01:002012-02-29T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2012-02-29:/second-article-fr.html<p>Ceci est un article, en français.</p> -Trop bien !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/oh-yeah-fr.html<p>Et voila du contenu en français</p> - \ No newline at end of file diff --git a/pelican/tests/output/custom/feeds/all.atom.xml b/pelican/tests/output/custom/feeds/all.atom.xml deleted file mode 100644 index f340f71f..00000000 --- a/pelican/tests/output/custom/feeds/all.atom.xml +++ /dev/null @@ -1,76 +0,0 @@ - -Alexis' loghttp://blog.notmyidea.org/2013-11-17T23:29:00+01:00A personal blog.FILENAME_METADATA example2012-11-30T00:00:00+01:002012-11-30T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2012-11-30:/filename_metadata-example.html<p>Some cool stuff!</p> -Second article2012-02-29T00:00:00+01:002012-02-29T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2012-02-29:/second-article.html<p>This is some article, in english</p> -Deuxième article2012-02-29T00:00:00+01:002012-02-29T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2012-02-29:/second-article-fr.html<p>Ceci est un article, en français.</p> -A markdown powered article2011-04-20T00:00:00+02:002011-04-20T00:00:00+02:00Alexis Métaireautag:blog.notmyidea.org,2011-04-20:/a-markdown-powered-article.html<p>You're mutually oblivious.</p> -<p><a href="http://blog.notmyidea.org/unbelievable.html">a root-relative link to unbelievable</a> -<a href="http://blog.notmyidea.org/unbelievable.html">a file-relative link to unbelievable</a></p>Article 12011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/article-1.html<p>Article 1</p> -Article 22011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/article-2.html<p>Article 2</p> -Article 32011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/article-3.html<p>Article 3</p> -This is a super article !2010-12-02T10:14:00+01:002013-11-17T23:29:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-12-02:/this-is-a-super-article.html<p class="first last">Multi-line metadata should be supported -as well as <strong>inline markup</strong>.</p> -<p>Some content here !</p> -<div class="section" id="this-is-a-simple-title"> -<h2>This is a simple title</h2> -<p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /> -<pre class="literal-block"> -&gt;&gt;&gt; from ipdb import set_trace -&gt;&gt;&gt; set_trace() -</pre> -<p>→ And now try with some utf8 hell: ééé</p> -</div> -Oh yeah !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/oh-yeah.html<div class="section" id="why-not"> -<h2>Why not ?</h2> -<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !</p> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> -Trop bien !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/oh-yeah-fr.html<p>Et voila du contenu en français</p> -Unbelievable !2010-10-15T20:30:00+02:002010-10-15T20:30:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-15:/unbelievable.html<p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a> -<a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div><p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a> -<a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will have nothing in default.</p> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table><p>Lovely.</p> -</div> -<div class="section" id="testing-more-sourcecode-directives"> -<h2>Testing more sourcecode directives</h2> -<div class="highlight"><pre><span></span><span id="foo-8"><a name="foo-8"></a><a href="#foo-8"><span class="linenos special"> 8</span></a><span class="testingk">def</span> <span class="testingnf">run</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingp">):</span><br></span><span id="foo-9"><a name="foo-9"></a><a href="#foo-9"><span class="linenos"> </span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">assert_has_content</span><span class="testingp">()</span><br></span><span id="foo-10"><a name="foo-10"></a><a href="#foo-10"><span class="linenos special">10</span></a> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a name="foo-11"></a><a href="#foo-11"><span class="linenos"> </span></a> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">get_lexer_by_name</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">arguments</span><span class="testingp">[</span><span class="testingmi">0</span><span class="testingp">])</span><br></span><span id="foo-12"><a name="foo-12"></a><a href="#foo-12"><span class="linenos special">12</span></a> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a name="foo-13"></a><a href="#foo-13"><span class="linenos"> </span></a> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a name="foo-14"></a><a href="#foo-14"><span class="linenos special">14</span></a> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">TextLexer</span><span class="testingp">()</span><br></span><span id="foo-15"><a name="foo-15"></a><a href="#foo-15"><span class="linenos"> </span></a><br></span><span id="foo-16"><a name="foo-16"></a><a href="#foo-16"><span class="linenos special">16</span></a> <span class="testingk">if</span> <span class="testingp">(</span><span class="testings1">&#39;linenos&#39;</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span> <span class="testingow">and</span><br></span><span id="foo-17"><a name="foo-17"></a><a href="#foo-17"><span class="linenos"> </span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingow">not</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;table&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;inline&#39;</span><span class="testingp">)):</span><br></span><span id="foo-18"><a name="foo-18"></a><a href="#foo-18"><span class="linenos special">18</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testings1">&#39;table&#39;</span><br></span><span id="foo-19"><a name="foo-19"></a><a href="#foo-19"><span class="linenos"> </span></a><br></span><span id="foo-20"><a name="foo-20"></a><a href="#foo-20"><span class="linenos special">20</span></a> <span class="testingk">for</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;nowrap&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;nobackground&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;anchorlinenos&#39;</span><span class="testingp">):</span><br></span><span id="foo-21"><a name="foo-21"></a><a href="#foo-21"><span class="linenos"> </span></a> <span class="testingk">if</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">:</span><br></span><span id="foo-22"><a name="foo-22"></a><a href="#foo-22"><span class="linenos special">22</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testingn">flag</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testingkc">True</span><br></span><span id="foo-23"><a name="foo-23"></a><a href="#foo-23"><span class="linenos"> </span></a><br></span><span id="foo-24"><a name="foo-24"></a><a href="#foo-24"><span class="linenos special">24</span></a> <span class="testingc1"># noclasses should already default to False, but just in case...</span><br></span><span id="foo-25"><a name="foo-25"></a><a href="#foo-25"><span class="linenos"> </span></a> <span class="testingn">formatter</span> <span class="testingo">=</span> <span class="testingn">HtmlFormatter</span><span class="testingp">(</span><span class="testingn">noclasses</span><span class="testingo">=</span><span class="testingkc">False</span><span class="testingp">,</span> <span class="testingo">**</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">)</span><br></span><span id="foo-26"><a name="foo-26"></a><a href="#foo-26"><span class="linenos special">26</span></a> <span class="testingn">parsed</span> <span class="testingo">=</span> <span class="testingn">highlight</span><span class="testingp">(</span><span class="testings1">&#39;</span><span class="testingse">\n</span><span class="testings1">&#39;</span><span class="testingo">.</span><span class="testingn">join</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">content</span><span class="testingp">),</span> <span class="testingn">lexer</span><span class="testingp">,</span> <span class="testingn">formatter</span><span class="testingp">)</span><br></span><span id="foo-27"><a name="foo-27"></a><a href="#foo-27"><span class="linenos"> </span></a> <span class="testingk">return</span> <span class="testingp">[</span><span class="testingn">nodes</span><span class="testingo">.</span><span class="testingn">raw</span><span class="testingp">(</span><span class="testings1">&#39;&#39;</span><span class="testingp">,</span> <span class="testingn">parsed</span><span class="testingp">,</span> <span class="testingnb">format</span><span class="testingo">=</span><span class="testings1">&#39;html&#39;</span><span class="testingp">)]</span><br></span></pre></div> -<p>Lovely.</p> -</div> -<div class="section" id="testing-even-more-sourcecode-directives"> -<h2>Testing even more sourcecode directives</h2> -<span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -<p>Lovely.</p> -</div> -<div class="section" id="testing-overriding-config-defaults"> -<h2>Testing overriding config defaults</h2> -<p>Even if the default is line numbers, we can override it here</p> -<div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -<p>Lovely.</p> -</div> -The baz tag2010-03-14T00:00:00+01:002010-03-14T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-03-14:/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> - \ No newline at end of file diff --git a/pelican/tests/output/custom/feeds/all.rss.xml b/pelican/tests/output/custom/feeds/all.rss.xml deleted file mode 100644 index e93d4753..00000000 --- a/pelican/tests/output/custom/feeds/all.rss.xml +++ /dev/null @@ -1,31 +0,0 @@ - -Alexis' loghttp://blog.notmyidea.org/A personal blog.Sun, 17 Nov 2013 23:29:00 +0100FILENAME_METADATA examplehttp://blog.notmyidea.org/filename_metadata-example.html<p>Some cool stuff!</p> -Alexis MétaireauFri, 30 Nov 2012 00:00:00 +0100tag:blog.notmyidea.org,2012-11-30:/filename_metadata-example.htmlmiscSecond articlehttp://blog.notmyidea.org/second-article.html<p>This is some article, in english</p> -Alexis MétaireauWed, 29 Feb 2012 00:00:00 +0100tag:blog.notmyidea.org,2012-02-29:/second-article.htmlmiscfoobarbazDeuxième articlehttp://blog.notmyidea.org/second-article-fr.html<p>Ceci est un article, en français.</p> -Alexis MétaireauWed, 29 Feb 2012 00:00:00 +0100tag:blog.notmyidea.org,2012-02-29:/second-article-fr.htmlmiscfoobarbazA markdown powered articlehttp://blog.notmyidea.org/a-markdown-powered-article.html<p>You're mutually oblivious.</p> -<p><a href="http://blog.notmyidea.org/unbelievable.html">a root-relative link to unbelievable</a> -<a href="http://blog.notmyidea.org/unbelievable.html">a file-relative link to unbelievable</a></p>Alexis MétaireauWed, 20 Apr 2011 00:00:00 +0200tag:blog.notmyidea.org,2011-04-20:/a-markdown-powered-article.htmlcat1Article 1http://blog.notmyidea.org/article-1.html<p>Article 1</p> -Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/article-1.htmlcat1Article 2http://blog.notmyidea.org/article-2.html<p>Article 2</p> -Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/article-2.htmlcat1Article 3http://blog.notmyidea.org/article-3.html<p>Article 3</p> -Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/article-3.htmlcat1This is a super article !http://blog.notmyidea.org/this-is-a-super-article.html<p class="first last">Multi-line metadata should be supported -as well as <strong>inline markup</strong>.</p> -Alexis MétaireauThu, 02 Dec 2010 10:14:00 +0100tag:blog.notmyidea.org,2010-12-02:/this-is-a-super-article.htmlyeahfoobarfoobarOh yeah !http://blog.notmyidea.org/oh-yeah.html<div class="section" id="why-not"> -<h2>Why not ?</h2> -<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !</p> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> -Alexis MétaireauWed, 20 Oct 2010 10:14:00 +0200tag:blog.notmyidea.org,2010-10-20:/oh-yeah.htmlbarohbaryeahTrop bien !http://blog.notmyidea.org/oh-yeah-fr.html<p>Et voila du contenu en français</p> -Alexis MétaireauWed, 20 Oct 2010 10:14:00 +0200tag:blog.notmyidea.org,2010-10-20:/oh-yeah-fr.htmlmiscUnbelievable !http://blog.notmyidea.org/unbelievable.html<p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a> -<a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div>Alexis MétaireauFri, 15 Oct 2010 20:30:00 +0200tag:blog.notmyidea.org,2010-10-15:/unbelievable.htmlmiscThe baz taghttp://blog.notmyidea.org/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> -Alexis MétaireauSun, 14 Mar 2010 00:00:00 +0100tag:blog.notmyidea.org,2010-03-14:/tag/baz.htmlmisc \ No newline at end of file diff --git a/pelican/tests/output/custom/feeds/bar.atom.xml b/pelican/tests/output/custom/feeds/bar.atom.xml deleted file mode 100644 index 002de037..00000000 --- a/pelican/tests/output/custom/feeds/bar.atom.xml +++ /dev/null @@ -1,8 +0,0 @@ - -Alexis' log - barhttp://blog.notmyidea.org/2010-10-20T10:14:00+02:00A personal blog.Oh yeah !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/oh-yeah.html<div class="section" id="why-not"> -<h2>Why not ?</h2> -<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !</p> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> - \ No newline at end of file diff --git a/pelican/tests/output/custom/feeds/bar.rss.xml b/pelican/tests/output/custom/feeds/bar.rss.xml deleted file mode 100644 index 53035e71..00000000 --- a/pelican/tests/output/custom/feeds/bar.rss.xml +++ /dev/null @@ -1,8 +0,0 @@ - -Alexis' log - barhttp://blog.notmyidea.org/A personal blog.Wed, 20 Oct 2010 10:14:00 +0200Oh yeah !http://blog.notmyidea.org/oh-yeah.html<div class="section" id="why-not"> -<h2>Why not ?</h2> -<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !</p> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> -Alexis MétaireauWed, 20 Oct 2010 10:14:00 +0200tag:blog.notmyidea.org,2010-10-20:/oh-yeah.htmlbarohbaryeah \ No newline at end of file diff --git a/pelican/tests/output/custom/feeds/cat1.atom.xml b/pelican/tests/output/custom/feeds/cat1.atom.xml deleted file mode 100644 index e8ed355b..00000000 --- a/pelican/tests/output/custom/feeds/cat1.atom.xml +++ /dev/null @@ -1,7 +0,0 @@ - -Alexis' log - cat1http://blog.notmyidea.org/2011-04-20T00:00:00+02:00A personal blog.A markdown powered article2011-04-20T00:00:00+02:002011-04-20T00:00:00+02:00Alexis Métaireautag:blog.notmyidea.org,2011-04-20:/a-markdown-powered-article.html<p>You're mutually oblivious.</p> -<p><a href="http://blog.notmyidea.org/unbelievable.html">a root-relative link to unbelievable</a> -<a href="http://blog.notmyidea.org/unbelievable.html">a file-relative link to unbelievable</a></p>Article 12011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/article-1.html<p>Article 1</p> -Article 22011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/article-2.html<p>Article 2</p> -Article 32011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/article-3.html<p>Article 3</p> - \ No newline at end of file diff --git a/pelican/tests/output/custom/feeds/cat1.rss.xml b/pelican/tests/output/custom/feeds/cat1.rss.xml deleted file mode 100644 index 9951b293..00000000 --- a/pelican/tests/output/custom/feeds/cat1.rss.xml +++ /dev/null @@ -1,7 +0,0 @@ - -Alexis' log - cat1http://blog.notmyidea.org/A personal blog.Wed, 20 Apr 2011 00:00:00 +0200A markdown powered articlehttp://blog.notmyidea.org/a-markdown-powered-article.html<p>You're mutually oblivious.</p> -<p><a href="http://blog.notmyidea.org/unbelievable.html">a root-relative link to unbelievable</a> -<a href="http://blog.notmyidea.org/unbelievable.html">a file-relative link to unbelievable</a></p>Alexis MétaireauWed, 20 Apr 2011 00:00:00 +0200tag:blog.notmyidea.org,2011-04-20:/a-markdown-powered-article.htmlcat1Article 1http://blog.notmyidea.org/article-1.html<p>Article 1</p> -Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/article-1.htmlcat1Article 2http://blog.notmyidea.org/article-2.html<p>Article 2</p> -Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/article-2.htmlcat1Article 3http://blog.notmyidea.org/article-3.html<p>Article 3</p> -Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/article-3.htmlcat1 \ No newline at end of file diff --git a/pelican/tests/output/custom/feeds/misc.atom.xml b/pelican/tests/output/custom/feeds/misc.atom.xml deleted file mode 100644 index b5a006e7..00000000 --- a/pelican/tests/output/custom/feeds/misc.atom.xml +++ /dev/null @@ -1,49 +0,0 @@ - -Alexis' log - mischttp://blog.notmyidea.org/2012-11-30T00:00:00+01:00A personal blog.FILENAME_METADATA example2012-11-30T00:00:00+01:002012-11-30T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2012-11-30:/filename_metadata-example.html<p>Some cool stuff!</p> -Second article2012-02-29T00:00:00+01:002012-02-29T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2012-02-29:/second-article.html<p>This is some article, in english</p> -Unbelievable !2010-10-15T20:30:00+02:002010-10-15T20:30:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-15:/unbelievable.html<p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a> -<a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div><p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a> -<a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will have nothing in default.</p> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table><p>Lovely.</p> -</div> -<div class="section" id="testing-more-sourcecode-directives"> -<h2>Testing more sourcecode directives</h2> -<div class="highlight"><pre><span></span><span id="foo-8"><a name="foo-8"></a><a href="#foo-8"><span class="linenos special"> 8</span></a><span class="testingk">def</span> <span class="testingnf">run</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingp">):</span><br></span><span id="foo-9"><a name="foo-9"></a><a href="#foo-9"><span class="linenos"> </span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">assert_has_content</span><span class="testingp">()</span><br></span><span id="foo-10"><a name="foo-10"></a><a href="#foo-10"><span class="linenos special">10</span></a> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a name="foo-11"></a><a href="#foo-11"><span class="linenos"> </span></a> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">get_lexer_by_name</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">arguments</span><span class="testingp">[</span><span class="testingmi">0</span><span class="testingp">])</span><br></span><span id="foo-12"><a name="foo-12"></a><a href="#foo-12"><span class="linenos special">12</span></a> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a name="foo-13"></a><a href="#foo-13"><span class="linenos"> </span></a> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a name="foo-14"></a><a href="#foo-14"><span class="linenos special">14</span></a> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">TextLexer</span><span class="testingp">()</span><br></span><span id="foo-15"><a name="foo-15"></a><a href="#foo-15"><span class="linenos"> </span></a><br></span><span id="foo-16"><a name="foo-16"></a><a href="#foo-16"><span class="linenos special">16</span></a> <span class="testingk">if</span> <span class="testingp">(</span><span class="testings1">&#39;linenos&#39;</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span> <span class="testingow">and</span><br></span><span id="foo-17"><a name="foo-17"></a><a href="#foo-17"><span class="linenos"> </span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingow">not</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;table&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;inline&#39;</span><span class="testingp">)):</span><br></span><span id="foo-18"><a name="foo-18"></a><a href="#foo-18"><span class="linenos special">18</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testings1">&#39;table&#39;</span><br></span><span id="foo-19"><a name="foo-19"></a><a href="#foo-19"><span class="linenos"> </span></a><br></span><span id="foo-20"><a name="foo-20"></a><a href="#foo-20"><span class="linenos special">20</span></a> <span class="testingk">for</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;nowrap&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;nobackground&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;anchorlinenos&#39;</span><span class="testingp">):</span><br></span><span id="foo-21"><a name="foo-21"></a><a href="#foo-21"><span class="linenos"> </span></a> <span class="testingk">if</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">:</span><br></span><span id="foo-22"><a name="foo-22"></a><a href="#foo-22"><span class="linenos special">22</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testingn">flag</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testingkc">True</span><br></span><span id="foo-23"><a name="foo-23"></a><a href="#foo-23"><span class="linenos"> </span></a><br></span><span id="foo-24"><a name="foo-24"></a><a href="#foo-24"><span class="linenos special">24</span></a> <span class="testingc1"># noclasses should already default to False, but just in case...</span><br></span><span id="foo-25"><a name="foo-25"></a><a href="#foo-25"><span class="linenos"> </span></a> <span class="testingn">formatter</span> <span class="testingo">=</span> <span class="testingn">HtmlFormatter</span><span class="testingp">(</span><span class="testingn">noclasses</span><span class="testingo">=</span><span class="testingkc">False</span><span class="testingp">,</span> <span class="testingo">**</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">)</span><br></span><span id="foo-26"><a name="foo-26"></a><a href="#foo-26"><span class="linenos special">26</span></a> <span class="testingn">parsed</span> <span class="testingo">=</span> <span class="testingn">highlight</span><span class="testingp">(</span><span class="testings1">&#39;</span><span class="testingse">\n</span><span class="testings1">&#39;</span><span class="testingo">.</span><span class="testingn">join</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">content</span><span class="testingp">),</span> <span class="testingn">lexer</span><span class="testingp">,</span> <span class="testingn">formatter</span><span class="testingp">)</span><br></span><span id="foo-27"><a name="foo-27"></a><a href="#foo-27"><span class="linenos"> </span></a> <span class="testingk">return</span> <span class="testingp">[</span><span class="testingn">nodes</span><span class="testingo">.</span><span class="testingn">raw</span><span class="testingp">(</span><span class="testings1">&#39;&#39;</span><span class="testingp">,</span> <span class="testingn">parsed</span><span class="testingp">,</span> <span class="testingnb">format</span><span class="testingo">=</span><span class="testings1">&#39;html&#39;</span><span class="testingp">)]</span><br></span></pre></div> -<p>Lovely.</p> -</div> -<div class="section" id="testing-even-more-sourcecode-directives"> -<h2>Testing even more sourcecode directives</h2> -<span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -<p>Lovely.</p> -</div> -<div class="section" id="testing-overriding-config-defaults"> -<h2>Testing overriding config defaults</h2> -<p>Even if the default is line numbers, we can override it here</p> -<div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -<p>Lovely.</p> -</div> -The baz tag2010-03-14T00:00:00+01:002010-03-14T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-03-14:/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> - \ No newline at end of file diff --git a/pelican/tests/output/custom/feeds/misc.rss.xml b/pelican/tests/output/custom/feeds/misc.rss.xml deleted file mode 100644 index b9958cdb..00000000 --- a/pelican/tests/output/custom/feeds/misc.rss.xml +++ /dev/null @@ -1,16 +0,0 @@ - -Alexis' log - mischttp://blog.notmyidea.org/A personal blog.Fri, 30 Nov 2012 00:00:00 +0100FILENAME_METADATA examplehttp://blog.notmyidea.org/filename_metadata-example.html<p>Some cool stuff!</p> -Alexis MétaireauFri, 30 Nov 2012 00:00:00 +0100tag:blog.notmyidea.org,2012-11-30:/filename_metadata-example.htmlmiscSecond articlehttp://blog.notmyidea.org/second-article.html<p>This is some article, in english</p> -Alexis MétaireauWed, 29 Feb 2012 00:00:00 +0100tag:blog.notmyidea.org,2012-02-29:/second-article.htmlmiscfoobarbazUnbelievable !http://blog.notmyidea.org/unbelievable.html<p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a> -<a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div>Alexis MétaireauFri, 15 Oct 2010 20:30:00 +0200tag:blog.notmyidea.org,2010-10-15:/unbelievable.htmlmiscThe baz taghttp://blog.notmyidea.org/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> -Alexis MétaireauSun, 14 Mar 2010 00:00:00 +0100tag:blog.notmyidea.org,2010-03-14:/tag/baz.htmlmisc \ No newline at end of file diff --git a/pelican/tests/output/custom/feeds/yeah.atom.xml b/pelican/tests/output/custom/feeds/yeah.atom.xml deleted file mode 100644 index 127ab590..00000000 --- a/pelican/tests/output/custom/feeds/yeah.atom.xml +++ /dev/null @@ -1,16 +0,0 @@ - -Alexis' log - yeahhttp://blog.notmyidea.org/2013-11-17T23:29:00+01:00A personal blog.This is a super article !2010-12-02T10:14:00+01:002013-11-17T23:29:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-12-02:/this-is-a-super-article.html<p class="first last">Multi-line metadata should be supported -as well as <strong>inline markup</strong>.</p> -<p>Some content here !</p> -<div class="section" id="this-is-a-simple-title"> -<h2>This is a simple title</h2> -<p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /> -<pre class="literal-block"> -&gt;&gt;&gt; from ipdb import set_trace -&gt;&gt;&gt; set_trace() -</pre> -<p>→ And now try with some utf8 hell: ééé</p> -</div> - \ No newline at end of file diff --git a/pelican/tests/output/custom/feeds/yeah.rss.xml b/pelican/tests/output/custom/feeds/yeah.rss.xml deleted file mode 100644 index 98b820ec..00000000 --- a/pelican/tests/output/custom/feeds/yeah.rss.xml +++ /dev/null @@ -1,4 +0,0 @@ - -Alexis' log - yeahhttp://blog.notmyidea.org/A personal blog.Sun, 17 Nov 2013 23:29:00 +0100This is a super article !http://blog.notmyidea.org/this-is-a-super-article.html<p class="first last">Multi-line metadata should be supported -as well as <strong>inline markup</strong>.</p> -Alexis MétaireauThu, 02 Dec 2010 10:14:00 +0100tag:blog.notmyidea.org,2010-12-02:/this-is-a-super-article.htmlyeahfoobarfoobar \ No newline at end of file diff --git a/pelican/tests/output/custom/filename_metadata-example.html b/pelican/tests/output/custom/filename_metadata-example.html deleted file mode 100644 index 2fcbe562..00000000 --- a/pelican/tests/output/custom/filename_metadata-example.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - FILENAME_METADATA example - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - FILENAME_METADATA example

    -
    - -
    -

    Some cool stuff!

    - -
    -
    -

    Comments !

    -
    - - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/index.html b/pelican/tests/output/custom/index.html deleted file mode 100644 index ff675f85..00000000 --- a/pelican/tests/output/custom/index.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - Alexis' log - - - - - - - -Fork me on GitHub - - - - -
    -

    Other articles

    -
    -
      - -
    1. - -
    2. - -
    3. -
    -

    - Page 1 / 3 - » - -

    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/index2.html b/pelican/tests/output/custom/index2.html deleted file mode 100644 index 941c176e..00000000 --- a/pelican/tests/output/custom/index2.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - Alexis' log - - - - - - - -Fork me on GitHub - - - -
    -
      -
    1. - -
    2. - -
    3. - -
    4. -
      -

      Oh yeah !

      -
      - -
      -
      -

      Why not ?

      -

      After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !

      -alternate text -
      - - read more -

      There are comments.

      -
    5. -
    -

    - - « - Page 2 / 3 - » - -

    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/index3.html b/pelican/tests/output/custom/index3.html deleted file mode 100644 index de32dbe3..00000000 --- a/pelican/tests/output/custom/index3.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - Alexis' log - - - - - - - -Fork me on GitHub - - - -
    -
      -
    1. - -
    2. -
    -

    - - « - Page 3 / 3 -

    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/jinja2_template.html b/pelican/tests/output/custom/jinja2_template.html deleted file mode 100644 index 1ba06323..00000000 --- a/pelican/tests/output/custom/jinja2_template.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - Alexis' log - - - - - - - -Fork me on GitHub - - - -Some text - -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/oh-yeah-fr.html b/pelican/tests/output/custom/oh-yeah-fr.html deleted file mode 100644 index bb7eb44e..00000000 --- a/pelican/tests/output/custom/oh-yeah-fr.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - Trop bien ! - - - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - Trop bien !

    -
    - -
    -

    Et voila du contenu en français

    - -
    -
    -

    Comments !

    -
    - - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/oh-yeah.html b/pelican/tests/output/custom/oh-yeah.html deleted file mode 100644 index f7afb399..00000000 --- a/pelican/tests/output/custom/oh-yeah.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - Oh yeah ! - - - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - Oh yeah !

    -
    - -
    -
    -

    Why not ?

    -

    After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !

    -alternate text -
    - -
    -
    -

    Comments !

    -
    - - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/override/index.html b/pelican/tests/output/custom/override/index.html deleted file mode 100644 index ebf07d8d..00000000 --- a/pelican/tests/output/custom/override/index.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - Override url/save_as - - - - - - - -Fork me on GitHub - - -
    -

    Override url/save_as

    - -

    Test page which overrides save_as and url so that this page will be generated -at a custom location.

    - -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/pages/this-is-a-test-hidden-page.html b/pelican/tests/output/custom/pages/this-is-a-test-hidden-page.html deleted file mode 100644 index e5fa1aaf..00000000 --- a/pelican/tests/output/custom/pages/this-is-a-test-hidden-page.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - This is a test hidden page - - - - - - - -Fork me on GitHub - - -
    -

    This is a test hidden page

    - -

    This is great for things like error(404) pages -Anyone can see this page but it's not linked to anywhere!

    - -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/pages/this-is-a-test-page.html b/pelican/tests/output/custom/pages/this-is-a-test-page.html deleted file mode 100644 index 26c6c0e9..00000000 --- a/pelican/tests/output/custom/pages/this-is-a-test-page.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - This is a test page - - - - - - - -Fork me on GitHub - - -
    -

    This is a test page

    - -

    Just an image.

    -alternate text -wrong path since 'images' folder does not exist - -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/pictures/Fat_Cat.jpg b/pelican/tests/output/custom/pictures/Fat_Cat.jpg deleted file mode 100644 index d8a96d35..00000000 Binary files a/pelican/tests/output/custom/pictures/Fat_Cat.jpg and /dev/null differ diff --git a/pelican/tests/output/custom/pictures/Sushi.jpg b/pelican/tests/output/custom/pictures/Sushi.jpg deleted file mode 100644 index e49e5f0a..00000000 Binary files a/pelican/tests/output/custom/pictures/Sushi.jpg and /dev/null differ diff --git a/pelican/tests/output/custom/pictures/Sushi_Macro.jpg b/pelican/tests/output/custom/pictures/Sushi_Macro.jpg deleted file mode 100644 index 21f935a1..00000000 Binary files a/pelican/tests/output/custom/pictures/Sushi_Macro.jpg and /dev/null differ diff --git a/pelican/tests/output/custom/robots.txt b/pelican/tests/output/custom/robots.txt deleted file mode 100644 index 19a6e299..00000000 --- a/pelican/tests/output/custom/robots.txt +++ /dev/null @@ -1,2 +0,0 @@ -User-agent: * -Disallow: /pictures diff --git a/pelican/tests/output/custom/second-article-fr.html b/pelican/tests/output/custom/second-article-fr.html deleted file mode 100644 index 8e360e9c..00000000 --- a/pelican/tests/output/custom/second-article-fr.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - Deuxième article - - - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - Deuxième article

    -
    - -
    -

    Ceci est un article, en français.

    - -
    -
    -

    Comments !

    -
    - - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/second-article.html b/pelican/tests/output/custom/second-article.html deleted file mode 100644 index 5001f0d0..00000000 --- a/pelican/tests/output/custom/second-article.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - Second article - - - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - Second article

    -
    - -
    -

    This is some article, in english

    - -
    -
    -

    Comments !

    -
    - - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/tag/bar.html b/pelican/tests/output/custom/tag/bar.html deleted file mode 100644 index b2b22714..00000000 --- a/pelican/tests/output/custom/tag/bar.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - Alexis' log - bar - - - - - - - -Fork me on GitHub - - - - -
    -

    Other articles

    -
    -
      - -
    1. - -
    2. -
      -

      Oh yeah !

      -
      - -
      -
      -

      Why not ?

      -

      After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !

      -alternate text -
      - - read more -

      There are comments.

      -
    3. -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/tag/baz.html b/pelican/tests/output/custom/tag/baz.html deleted file mode 100644 index ef53c34c..00000000 --- a/pelican/tests/output/custom/tag/baz.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - The baz tag - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - The baz tag

    -
    - -
    -

    This article overrides the listening of the articles under the baz tag.

    - -
    -
    -

    Comments !

    -
    - - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/tag/foo.html b/pelican/tests/output/custom/tag/foo.html deleted file mode 100644 index 7684fbc5..00000000 --- a/pelican/tests/output/custom/tag/foo.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - Alexis' log - foo - - - - - - - -Fork me on GitHub - - - - -
    -

    Other articles

    -
    -
      - -
    1. -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/tag/foobar.html b/pelican/tests/output/custom/tag/foobar.html deleted file mode 100644 index 5816e395..00000000 --- a/pelican/tests/output/custom/tag/foobar.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - Alexis' log - foobar - - - - - - - -Fork me on GitHub - - - - -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/tag/oh.html b/pelican/tests/output/custom/tag/oh.html deleted file mode 100644 index 16ea9d0d..00000000 --- a/pelican/tests/output/custom/tag/oh.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - Oh Oh Oh - - - - - - - -Fork me on GitHub - - -
    -

    Oh Oh Oh

    - -

    This page overrides the listening of the articles under the oh tag.

    - -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/tag/yeah.html b/pelican/tests/output/custom/tag/yeah.html deleted file mode 100644 index 929a48e0..00000000 --- a/pelican/tests/output/custom/tag/yeah.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - Alexis' log - yeah - - - - - - - -Fork me on GitHub - - - - -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/tags.html b/pelican/tests/output/custom/tags.html deleted file mode 100644 index 244c21e3..00000000 --- a/pelican/tests/output/custom/tags.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - Alexis' log - Tags - - - - - - - -Fork me on GitHub - - - -
    -

    Tags for Alexis' log

    - -
    - -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/theme/css/fonts.css b/pelican/tests/output/custom/theme/css/fonts.css deleted file mode 100644 index 56015076..00000000 --- a/pelican/tests/output/custom/theme/css/fonts.css +++ /dev/null @@ -1,12 +0,0 @@ -@font-face { - font-family: 'Yanone Kaffeesatz'; - font-style: normal; - font-weight: 400; - src: - local('Yanone Kaffeesatz Regular'), - local('YanoneKaffeesatz-Regular'), - /* from https://fonts.gstatic.com/s/yanonekaffeesatz/v8/YDAoLskQQ5MOAgvHUQCcLRTHiN2BPBirwIkMLKUspj4.woff */ - url('../fonts/Yanone_Kaffeesatz_400.woff') format('woff'), - /* from https://fonts.gstatic.com/s/yanonekaffeesatz/v8/YDAoLskQQ5MOAgvHUQCcLfGwxTS8d1Q9KiDNCMKLFUM.woff2 */ - url('../fonts/Yanone_Kaffeesatz_400.woff2') format('woff2'); -} diff --git a/pelican/tests/output/custom/theme/css/main.css b/pelican/tests/output/custom/theme/css/main.css deleted file mode 100644 index aaea9b81..00000000 --- a/pelican/tests/output/custom/theme/css/main.css +++ /dev/null @@ -1,466 +0,0 @@ -/* - Name: Smashing HTML5 - Date: July 2009 - Description: Sample layout for HTML5 and CSS3 goodness. - Version: 1.0 - License: MIT - Licensed by: Smashing Media GmbH - Original author: Enrique Ramírez -*/ - -/* Imports */ -@import url("reset.css"); -@import url("pygment.css"); -@import url("typogrify.css"); -@import url("fonts.css"); - -/***** Global *****/ -/* Body */ -body { - background: #F5F4EF; - color: #000305; - font-size: 87.5%; /* Base font size: 14px */ - font-family: 'Trebuchet MS', Trebuchet, 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; - line-height: 1.429; - margin: 0; - padding: 0; - text-align: left; -} - -/* Headings */ -h1 {font-size: 2em } -h2 {font-size: 1.571em} /* 22px */ -h3 {font-size: 1.429em} /* 20px */ -h4 {font-size: 1.286em} /* 18px */ -h5 {font-size: 1.143em} /* 16px */ -h6 {font-size: 1em} /* 14px */ - -h1, h2, h3, h4, h5, h6 { - font-weight: 400; - line-height: 1.1; - margin-bottom: .8em; - font-family: 'Yanone Kaffeesatz', arial, serif; -} - -h3, h4, h5, h6 { margin-top: .8em; } - -hr { border: 2px solid #EEEEEE; } - -/* Anchors */ -a {outline: 0;} -a img {border: 0px; text-decoration: none;} -a:link, a:visited { - color: #C74350; - padding: 0 1px; - text-decoration: underline; -} -a:hover, a:active { - background-color: #C74350; - color: #fff; - text-decoration: none; - text-shadow: 1px 1px 1px #333; -} - -h1 a:hover { - background-color: inherit -} - -/* Paragraphs */ -div.line-block, -p { margin-top: 1em; - margin-bottom: 1em;} - -strong, b {font-weight: bold;} -em, i {font-style: italic;} - -/* Lists */ -ul { - list-style: outside disc; - margin: 0em 0 0 1.5em; -} - -ol { - list-style: outside decimal; - margin: 0em 0 0 1.5em; -} - -li { margin-top: 0.5em; - margin-bottom: 1em; } - -.post-info { - float:right; - margin:10px; - padding:5px; -} - -.post-info p{ - margin-top: 1px; - margin-bottom: 1px; -} - -.readmore { float: right } - -dl {margin: 0 0 1.5em 0;} -dt {font-weight: bold;} -dd {margin-left: 1.5em;} - -pre{background-color: rgb(238, 238, 238); padding: 10px; margin: 10px; overflow: auto;} - -/* Quotes */ -blockquote { - margin: 20px; - font-style: italic; -} -cite {} - -q {} - -div.note { - float: right; - margin: 5px; - font-size: 85%; - max-width: 300px; -} - -/* Tables */ -table {margin: .5em auto 1.5em auto; width: 98%;} - - /* Thead */ - thead th {padding: .5em .4em; text-align: left;} - thead td {} - - /* Tbody */ - tbody td {padding: .5em .4em;} - tbody th {} - - tbody .alt td {} - tbody .alt th {} - - /* Tfoot */ - tfoot th {} - tfoot td {} - -/* HTML5 tags */ -header, section, footer, -aside, nav, article, figure { - display: block; -} - -/***** Layout *****/ -.body {clear: both; margin: 0 auto; width: 800px;} -img.right, figure.right, div.figure.align-right { - float: right; - margin: 0 0 2em 2em; -} -img.left, figure.left, div.figure.align-left { - float: left; - margin: 0 2em 2em 0; -} - -/* .rst support */ -div.figure img, figure img { /* to fill figure exactly */ - width: 100%; -} -div.figure p.caption, figure p.caption { /* margin provided by figure */ - margin-top: 0; - margin-bottom: 0; -} - -/* - Header -*****************/ -#banner { - margin: 0 auto; - padding: 2.5em 0 0 0; -} - - /* Banner */ - #banner h1 {font-size: 3.571em; line-height: 0;} - #banner h1 a:link, #banner h1 a:visited { - color: #000305; - display: block; - font-weight: bold; - margin: 0 0 .6em .2em; - text-decoration: none; - } - #banner h1 a:hover, #banner h1 a:active { - background: none; - color: #C74350; - text-shadow: none; - } - - #banner h1 strong {font-size: 0.36em; font-weight: normal;} - - /* Main Nav */ - #banner nav { - background: #000305; - font-size: 1.143em; - height: 40px; - line-height: 30px; - margin: 0 auto 2em auto; - padding: 0; - text-align: center; - width: 800px; - - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - } - - #banner nav ul {list-style: none; margin: 0 auto; width: 800px;} - #banner nav li {float: left; display: inline; margin: 0;} - - #banner nav a:link, #banner nav a:visited { - color: #fff; - display: inline-block; - height: 30px; - padding: 5px 1.5em; - text-decoration: none; - } - #banner nav a:hover, #banner nav a:active, - #banner nav .active a:link, #banner nav .active a:visited { - background: #C74451; - color: #fff; - text-shadow: none !important; - } - - #banner nav li:first-child a { - border-top-left-radius: 5px; - -moz-border-radius-topleft: 5px; - -webkit-border-top-left-radius: 5px; - - border-bottom-left-radius: 5px; - -moz-border-radius-bottomleft: 5px; - -webkit-border-bottom-left-radius: 5px; - } - -/* - Featured -*****************/ -#featured { - background: #fff; - margin-bottom: 2em; - overflow: hidden; - padding: 20px; - width: 760px; - - border-radius: 10px; - -moz-border-radius: 10px; - -webkit-border-radius: 10px; -} - -#featured figure { - border: 2px solid #eee; - float: right; - margin: 0.786em 2em 0 5em; - width: 248px; -} -#featured figure img {display: block; float: right;} - -#featured h2 {color: #C74451; font-size: 1.714em; margin-bottom: 0.333em;} -#featured h3 {font-size: 1.429em; margin-bottom: .5em;} - -#featured h3 a:link, #featured h3 a:visited {color: #000305; text-decoration: none;} -#featured h3 a:hover, #featured h3 a:active {color: #fff;} - -/* - Body -*****************/ -#content { - background: #fff; - margin-bottom: 2em; - overflow: hidden; - padding: 20px 20px; - width: 760px; - - border-radius: 10px; - -moz-border-radius: 10px; - -webkit-border-radius: 10px; -} - -/* - Extras -*****************/ -#extras {margin: 0 auto 3em auto; overflow: hidden;} - -#extras ul {list-style: none; margin: 0;} -#extras li {border-bottom: 1px solid #fff;} -#extras h2 { - color: #C74350; - font-size: 1.429em; - margin-bottom: .25em; - padding: 0 3px; -} - -#extras a:link, #extras a:visited { - color: #444; - display: block; - border-bottom: 1px solid #F4E3E3; - text-decoration: none; - padding: .3em .25em; -} - -#extras a:hover, #extras a:active {color: #fff;} - - /* Blogroll */ - #extras .blogroll { - float: left; - width: 615px; - } - - #extras .blogroll li {float: left; margin: 0 20px 0 0; width: 185px;} - - /* Social */ - #extras .social { - float: right; - width: 175px; - } - - #extras div[class='social'] a { - background-repeat: no-repeat; - background-position: 3px 6px; - padding-left: 25px; - } - - /* Icons */ - .social a[href*='about.me'] {background-image: url('../images/icons/aboutme.png');} - .social a[href*='bitbucket.org'] {background-image: url('../images/icons/bitbucket.png');} - .social a[href*='delicious.com'] {background-image: url('../images/icons/delicious.png');} - .social a[href*='facebook.com'] {background-image: url('../images/icons/facebook.png');} - .social a[href*='gitorious.org'] {background-image: url('../images/icons/gitorious.png');} - .social a[href*='github.com'], - .social a[href*='git.io'] { - background-image: url('../images/icons/github.png'); - background-size: 16px 16px; - } - .social a[href*='gittip.com'] {background-image: url('../images/icons/gittip.png');} - .social a[href*='plus.google.com'] {background-image: url('../images/icons/google-plus.png');} - .social a[href*='groups.google.com'] {background-image: url('../images/icons/google-groups.png');} - .social a[href*='news.ycombinator.com'], - .social a[href*='hackernewsers.com'] {background-image: url('../images/icons/hackernews.png');} - .social a[href*='last.fm'], .social a[href*='lastfm.'] {background-image: url('../images/icons/lastfm.png');} - .social a[href*='linkedin.com'] {background-image: url('../images/icons/linkedin.png');} - .social a[href*='reddit.com'] {background-image: url('../images/icons/reddit.png');} - .social a[type$='atom+xml'], .social a[type$='rss+xml'] {background-image: url('../images/icons/rss.png');} - .social a[href*='slideshare.net'] {background-image: url('../images/icons/slideshare.png');} - .social a[href*='speakerdeck.com'] {background-image: url('../images/icons/speakerdeck.png');} - .social a[href*='stackoverflow.com'] {background-image: url('../images/icons/stackoverflow.png');} - .social a[href*='twitter.com'] {background-image: url('../images/icons/twitter.png');} - .social a[href*='vimeo.com'] {background-image: url('../images/icons/vimeo.png');} - .social a[href*='youtube.com'] {background-image: url('../images/icons/youtube.png');} - -/* - About -*****************/ -#about { - background: #fff; - font-style: normal; - margin-bottom: 2em; - overflow: hidden; - padding: 20px; - text-align: left; - width: 760px; - - border-radius: 10px; - -moz-border-radius: 10px; - -webkit-border-radius: 10px; -} - -#about .primary {float: left; width: 165px;} -#about .primary strong {color: #C64350; display: block; font-size: 1.286em;} -#about .photo {float: left; margin: 5px 20px;} - -#about .url:link, #about .url:visited {text-decoration: none;} - -#about .bio {float: right; width: 500px;} - -/* - Footer -*****************/ -#contentinfo {padding-bottom: 2em; text-align: right;} - -/***** Sections *****/ -/* Blog */ -.hentry { - display: block; - clear: both; - border-top: 1px solid #eee; - padding: 1.5em 0; -} -li:first-child .hentry, #content > .hentry {border: 0; margin: 0;} -#content > .hentry {padding: 1em 0;} -.hentry img{display : none ;} -.entry-title {font-size: 3em; margin-bottom: 10px; margin-top: 0;} -.entry-title a:link, .entry-title a:visited {text-decoration: none; color: #333;} -.entry-title a:visited {background-color: #fff;} - -.hentry .post-info * {font-style: normal;} - - /* Content */ - .hentry footer {margin-bottom: 2em;} - .hentry footer address {display: inline;} - #posts-list footer address {display: block;} - - /* Blog Index */ - #posts-list {list-style: none; margin: 0;} - #posts-list .hentry {padding-left: 10px; position: relative;} - - #posts-list footer { - left: 10px; - position: relative; - float: left; - top: 0.5em; - width: 190px; - } - - /* About the Author */ - #about-author { - background: #f9f9f9; - clear: both; - font-style: normal; - margin: 2em 0; - padding: 10px 20px 15px 20px; - - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - } - - #about-author strong { - color: #C64350; - clear: both; - display: block; - font-size: 1.429em; - } - - #about-author .photo {border: 1px solid #ddd; float: left; margin: 5px 1em 0 0;} - - /* Comments */ - #comments-list {list-style: none; margin: 0 1em;} - #comments-list blockquote { - background: #f8f8f8; - clear: both; - font-style: normal; - margin: 0; - padding: 15px 20px; - - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - } - #comments-list footer {color: #888; padding: .5em 1em 0 0; text-align: right;} - - #comments-list li:nth-child(2n) blockquote {background: #F5f5f5;} - - /* Add a Comment */ - #add-comment label {clear: left; float: left; text-align: left; width: 150px;} - #add-comment input[type='text'], - #add-comment input[type='email'], - #add-comment input[type='url'] {float: left; width: 200px;} - - #add-comment textarea {float: left; height: 150px; width: 495px;} - - #add-comment p.req {clear: both; margin: 0 .5em 1em 0; text-align: right;} - - #add-comment input[type='submit'] {float: right; margin: 0 .5em;} - #add-comment * {margin-bottom: .5em;} diff --git a/pelican/tests/output/custom/theme/css/pygment.css b/pelican/tests/output/custom/theme/css/pygment.css deleted file mode 100644 index fdd056f6..00000000 --- a/pelican/tests/output/custom/theme/css/pygment.css +++ /dev/null @@ -1,205 +0,0 @@ -.hll { -background-color:#eee; -} -.c { -color:#408090; -font-style:italic; -} -.err { -border:1px solid #FF0000; -} -.k { -color:#007020; -font-weight:bold; -} -.o { -color:#666666; -} -.cm { -color:#408090; -font-style:italic; -} -.cp { -color:#007020; -} -.c1 { -color:#408090; -font-style:italic; -} -.cs { -background-color:#FFF0F0; -color:#408090; -} -.gd { -color:#A00000; -} -.ge { -font-style:italic; -} -.gr { -color:#FF0000; -} -.gh { -color:#000080; -font-weight:bold; -} -.gi { -color:#00A000; -} -.go { -color:#303030; -} -.gp { -color:#C65D09; -font-weight:bold; -} -.gs { -font-weight:bold; -} -.gu { -color:#800080; -font-weight:bold; -} -.gt { -color:#0040D0; -} -.kc { -color:#007020; -font-weight:bold; -} -.kd { -color:#007020; -font-weight:bold; -} -.kn { -color:#007020; -font-weight:bold; -} -.kp { -color:#007020; -} -.kr { -color:#007020; -font-weight:bold; -} -.kt { -color:#902000; -} -.m { -color:#208050; -} -.s { -color:#4070A0; -} -.na { -color:#4070A0; -} -.nb { -color:#007020; -} -.nc { -color:#0E84B5; -font-weight:bold; -} -.no { -color:#60ADD5; -} -.nd { -color:#555555; -font-weight:bold; -} -.ni { -color:#D55537; -font-weight:bold; -} -.ne { -color:#007020; -} -.nf { -color:#06287E; -} -.nl { -color:#002070; -font-weight:bold; -} -.nn { -color:#0E84B5; -font-weight:bold; -} -.nt { -color:#062873; -font-weight:bold; -} -.nv { -color:#BB60D5; -} -.ow { -color:#007020; -font-weight:bold; -} -.w { -color:#BBBBBB; -} -.mf { -color:#208050; -} -.mh { -color:#208050; -} -.mi { -color:#208050; -} -.mo { -color:#208050; -} -.sb { -color:#4070A0; -} -.sc { -color:#4070A0; -} -.sd { -color:#4070A0; -font-style:italic; -} -.s2 { -color:#4070A0; -} -.se { -color:#4070A0; -font-weight:bold; -} -.sh { -color:#4070A0; -} -.si { -color:#70A0D0; -font-style:italic; -} -.sx { -color:#C65D09; -} -.sr { -color:#235388; -} -.s1 { -color:#4070A0; -} -.ss { -color:#517918; -} -.bp { -color:#007020; -} -.vc { -color:#BB60D5; -} -.vg { -color:#BB60D5; -} -.vi { -color:#BB60D5; -} -.il { -color:#208050; -} diff --git a/pelican/tests/output/custom/theme/css/reset.css b/pelican/tests/output/custom/theme/css/reset.css deleted file mode 100644 index c88e6196..00000000 --- a/pelican/tests/output/custom/theme/css/reset.css +++ /dev/null @@ -1,52 +0,0 @@ -/* - Name: Reset Stylesheet - Description: Resets browser's default CSS - Author: Eric Meyer - Author URI: https://meyerweb.com/eric/tools/css/reset/ -*/ - -/* v1.0 | 20080212 */ -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, font, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td { - background: transparent; - border: 0; - font-size: 100%; - margin: 0; - outline: 0; - padding: 0; - vertical-align: baseline; -} - -body {line-height: 1;} - -ol, ul {list-style: none;} - -blockquote, q {quotes: none;} - -blockquote:before, blockquote:after, -q:before, q:after { - content: ''; - content: none; -} - -/* remember to define focus styles! */ -:focus { - outline: 0; -} - -/* remember to highlight inserts somehow! */ -ins {text-decoration: none;} -del {text-decoration: line-through;} - -/* tables still need 'cellspacing="0"' in the markup */ -table { - border-collapse: collapse; - border-spacing: 0; -} \ No newline at end of file diff --git a/pelican/tests/output/custom/theme/css/typogrify.css b/pelican/tests/output/custom/theme/css/typogrify.css deleted file mode 100644 index 3bae4976..00000000 --- a/pelican/tests/output/custom/theme/css/typogrify.css +++ /dev/null @@ -1,3 +0,0 @@ -.caps {font-size:.92em;} -.amp {color:#666; font-size:1.05em;font-family:"Warnock Pro", "Goudy Old Style","Palatino","Book Antiqua",serif; font-style:italic;} -.dquo {margin-left:-.38em;} diff --git a/pelican/tests/output/custom/theme/css/wide.css b/pelican/tests/output/custom/theme/css/wide.css deleted file mode 100644 index 88fd59ce..00000000 --- a/pelican/tests/output/custom/theme/css/wide.css +++ /dev/null @@ -1,48 +0,0 @@ -@import url("main.css"); - -body { - font:1.3em/1.3 "Hoefler Text","Georgia",Georgia,serif,sans-serif; -} - -.post-info{ - display: none; -} - -#banner nav { - display: none; - -moz-border-radius: 0px; - margin-bottom: 20px; - overflow: hidden; - font-size: 1em; - background: #F5F4EF; -} - -#banner nav ul{ - padding-right: 50px; -} - -#banner nav li{ - float: right; - color: #000; -} - -#banner nav li a { - color: #000; -} - -#banner h1 { - margin-bottom: -18px; -} - -#featured, #extras { - padding: 50px; -} - -#featured { - padding-top: 20px; -} - -#extras { - padding-top: 0px; - padding-bottom: 0px; -} diff --git a/pelican/tests/output/custom/theme/fonts/Yanone_Kaffeesatz_400.eot b/pelican/tests/output/custom/theme/fonts/Yanone_Kaffeesatz_400.eot deleted file mode 100644 index b3b90dbc..00000000 Binary files a/pelican/tests/output/custom/theme/fonts/Yanone_Kaffeesatz_400.eot and /dev/null differ diff --git a/pelican/tests/output/custom/theme/fonts/Yanone_Kaffeesatz_400.svg b/pelican/tests/output/custom/theme/fonts/Yanone_Kaffeesatz_400.svg deleted file mode 100644 index a69669b5..00000000 --- a/pelican/tests/output/custom/theme/fonts/Yanone_Kaffeesatz_400.svg +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pelican/tests/output/custom/theme/fonts/Yanone_Kaffeesatz_400.ttf b/pelican/tests/output/custom/theme/fonts/Yanone_Kaffeesatz_400.ttf deleted file mode 100644 index 6f4feb02..00000000 Binary files a/pelican/tests/output/custom/theme/fonts/Yanone_Kaffeesatz_400.ttf and /dev/null differ diff --git a/pelican/tests/output/custom/theme/fonts/Yanone_Kaffeesatz_400.woff b/pelican/tests/output/custom/theme/fonts/Yanone_Kaffeesatz_400.woff deleted file mode 100644 index ddccf765..00000000 Binary files a/pelican/tests/output/custom/theme/fonts/Yanone_Kaffeesatz_400.woff and /dev/null differ diff --git a/pelican/tests/output/custom/theme/fonts/Yanone_Kaffeesatz_400.woff2 b/pelican/tests/output/custom/theme/fonts/Yanone_Kaffeesatz_400.woff2 deleted file mode 100644 index 7b18f7ea..00000000 Binary files a/pelican/tests/output/custom/theme/fonts/Yanone_Kaffeesatz_400.woff2 and /dev/null differ diff --git a/pelican/tests/output/custom/theme/fonts/font.css b/pelican/tests/output/custom/theme/fonts/font.css deleted file mode 100644 index a9eb87e6..00000000 --- a/pelican/tests/output/custom/theme/fonts/font.css +++ /dev/null @@ -1,12 +0,0 @@ -@font-face { - font-family: 'Yanone Kaffeesatz'; - font-style: normal; - font-weight: 400; - src: - local('Yanone Kaffeesatz Regular'), - local('YanoneKaffeesatz-Regular'), - /* from https://fonts.gstatic.com/s/yanonekaffeesatz/v8/YDAoLskQQ5MOAgvHUQCcLRTHiN2BPBirwIkMLKUspj4.woff */ - url('Yanone_Kaffeesatz_400.woff') format('woff'), - /* from https://fonts.gstatic.com/s/yanonekaffeesatz/v8/YDAoLskQQ5MOAgvHUQCcLfGwxTS8d1Q9KiDNCMKLFUM.woff2 */ - url('Yanone_Kaffeesatz_400.woff2') format('woff2'); -} diff --git a/pelican/tests/output/custom/theme/images/icons/aboutme.png b/pelican/tests/output/custom/theme/images/icons/aboutme.png deleted file mode 100644 index 600110f2..00000000 Binary files a/pelican/tests/output/custom/theme/images/icons/aboutme.png and /dev/null differ diff --git a/pelican/tests/output/custom/theme/images/icons/bitbucket.png b/pelican/tests/output/custom/theme/images/icons/bitbucket.png deleted file mode 100644 index 277a7dfb..00000000 Binary files a/pelican/tests/output/custom/theme/images/icons/bitbucket.png and /dev/null differ diff --git a/pelican/tests/output/custom/theme/images/icons/delicious.png b/pelican/tests/output/custom/theme/images/icons/delicious.png deleted file mode 100644 index 34868c5c..00000000 Binary files a/pelican/tests/output/custom/theme/images/icons/delicious.png and /dev/null differ diff --git a/pelican/tests/output/custom/theme/images/icons/facebook.png b/pelican/tests/output/custom/theme/images/icons/facebook.png deleted file mode 100644 index 1d8a4327..00000000 Binary files a/pelican/tests/output/custom/theme/images/icons/facebook.png and /dev/null differ diff --git a/pelican/tests/output/custom/theme/images/icons/github.png b/pelican/tests/output/custom/theme/images/icons/github.png deleted file mode 100644 index 5d9109de..00000000 Binary files a/pelican/tests/output/custom/theme/images/icons/github.png and /dev/null differ diff --git a/pelican/tests/output/custom/theme/images/icons/gitorious.png b/pelican/tests/output/custom/theme/images/icons/gitorious.png deleted file mode 100644 index a6705d0f..00000000 Binary files a/pelican/tests/output/custom/theme/images/icons/gitorious.png and /dev/null differ diff --git a/pelican/tests/output/custom/theme/images/icons/gittip.png b/pelican/tests/output/custom/theme/images/icons/gittip.png deleted file mode 100644 index b9f67aaa..00000000 Binary files a/pelican/tests/output/custom/theme/images/icons/gittip.png and /dev/null differ diff --git a/pelican/tests/output/custom/theme/images/icons/google-groups.png b/pelican/tests/output/custom/theme/images/icons/google-groups.png deleted file mode 100644 index bbd0a0fd..00000000 Binary files a/pelican/tests/output/custom/theme/images/icons/google-groups.png and /dev/null differ diff --git a/pelican/tests/output/custom/theme/images/icons/google-plus.png b/pelican/tests/output/custom/theme/images/icons/google-plus.png deleted file mode 100644 index f8553d45..00000000 Binary files a/pelican/tests/output/custom/theme/images/icons/google-plus.png and /dev/null differ diff --git a/pelican/tests/output/custom/theme/images/icons/hackernews.png b/pelican/tests/output/custom/theme/images/icons/hackernews.png deleted file mode 100644 index 8e05e3ee..00000000 Binary files a/pelican/tests/output/custom/theme/images/icons/hackernews.png and /dev/null differ diff --git a/pelican/tests/output/custom/theme/images/icons/lastfm.png b/pelican/tests/output/custom/theme/images/icons/lastfm.png deleted file mode 100644 index 2eedd2da..00000000 Binary files a/pelican/tests/output/custom/theme/images/icons/lastfm.png and /dev/null differ diff --git a/pelican/tests/output/custom/theme/images/icons/linkedin.png b/pelican/tests/output/custom/theme/images/icons/linkedin.png deleted file mode 100644 index 06a88016..00000000 Binary files a/pelican/tests/output/custom/theme/images/icons/linkedin.png and /dev/null differ diff --git a/pelican/tests/output/custom/theme/images/icons/reddit.png b/pelican/tests/output/custom/theme/images/icons/reddit.png deleted file mode 100644 index d826d3e7..00000000 Binary files a/pelican/tests/output/custom/theme/images/icons/reddit.png and /dev/null differ diff --git a/pelican/tests/output/custom/theme/images/icons/rss.png b/pelican/tests/output/custom/theme/images/icons/rss.png deleted file mode 100644 index 12448f53..00000000 Binary files a/pelican/tests/output/custom/theme/images/icons/rss.png and /dev/null differ diff --git a/pelican/tests/output/custom/theme/images/icons/slideshare.png b/pelican/tests/output/custom/theme/images/icons/slideshare.png deleted file mode 100644 index 9cbe8588..00000000 Binary files a/pelican/tests/output/custom/theme/images/icons/slideshare.png and /dev/null differ diff --git a/pelican/tests/output/custom/theme/images/icons/speakerdeck.png b/pelican/tests/output/custom/theme/images/icons/speakerdeck.png deleted file mode 100644 index 7281ec48..00000000 Binary files a/pelican/tests/output/custom/theme/images/icons/speakerdeck.png and /dev/null differ diff --git a/pelican/tests/output/custom/theme/images/icons/stackoverflow.png b/pelican/tests/output/custom/theme/images/icons/stackoverflow.png deleted file mode 100644 index 3c6862e9..00000000 Binary files a/pelican/tests/output/custom/theme/images/icons/stackoverflow.png and /dev/null differ diff --git a/pelican/tests/output/custom/theme/images/icons/twitter.png b/pelican/tests/output/custom/theme/images/icons/twitter.png deleted file mode 100644 index cef1cef9..00000000 Binary files a/pelican/tests/output/custom/theme/images/icons/twitter.png and /dev/null differ diff --git a/pelican/tests/output/custom/theme/images/icons/vimeo.png b/pelican/tests/output/custom/theme/images/icons/vimeo.png deleted file mode 100644 index 4b9d7212..00000000 Binary files a/pelican/tests/output/custom/theme/images/icons/vimeo.png and /dev/null differ diff --git a/pelican/tests/output/custom/theme/images/icons/youtube.png b/pelican/tests/output/custom/theme/images/icons/youtube.png deleted file mode 100644 index e334e68e..00000000 Binary files a/pelican/tests/output/custom/theme/images/icons/youtube.png and /dev/null differ diff --git a/pelican/tests/output/custom/this-is-a-super-article.html b/pelican/tests/output/custom/this-is-a-super-article.html deleted file mode 100644 index 55053cb2..00000000 --- a/pelican/tests/output/custom/this-is-a-super-article.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - This is a super article ! - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - This is a super article !

    -
    - -
    -

    Some content here !

    -
    -

    This is a simple title

    -

    And here comes the cool stuff.

    -alternate text -alternate text -
    ->>> from ipdb import set_trace
    ->>> set_trace()
    -
    -

    → And now try with some utf8 hell: ééé

    -
    - -
    -
    -

    Comments !

    -
    - - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom/unbelievable.html b/pelican/tests/output/custom/unbelievable.html deleted file mode 100644 index a103868e..00000000 --- a/pelican/tests/output/custom/unbelievable.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - Unbelievable ! - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - Unbelievable !

    -
    - -
    -

    Or completely awesome. Depends the needs.

    -

    a root-relative link to markdown-article -a file-relative link to markdown-article

    -
    -

    Testing sourcecode directive

    -
    1
    formatter = self.options and VARIANTS[self.options.keys()[0]]
    -
    -
    -
    -

    Testing another case

    -

    This will now have a line number in 'custom' since it's the default in -pelican.conf, it will have nothing in default.

    -
    1
    formatter = self.options and VARIANTS[self.options.keys()[0]]
    -
    -

    Lovely.

    -
    -
    -

    Testing more sourcecode directives

    -
     8def run(self):
    self.assert_has_content()
    10 try:
    lexer = get_lexer_by_name(self.arguments[0])
    12 except ValueError:
    # no lexer found - use the text one instead of an exception
    14 lexer = TextLexer()

    16 if ('linenos' in self.options and
    self.options['linenos'] not in ('table', 'inline')):
    18 self.options['linenos'] = 'table'

    20 for flag in ('nowrap', 'nobackground', 'anchorlinenos'):
    if flag in self.options:
    22 self.options[flag] = True

    24 # noclasses should already default to False, but just in case...
    formatter = HtmlFormatter(noclasses=False, **self.options)
    26 parsed = highlight('\n'.join(self.content), lexer, formatter)
    return [nodes.raw('', parsed, format='html')]
    -

    Lovely.

    -
    -
    -

    Testing even more sourcecode directives

    -formatter = self.options and VARIANTS[self.options.keys()[0]] -

    Lovely.

    -
    -
    -

    Testing overriding config defaults

    -

    Even if the default is line numbers, we can override it here

    -
    formatter = self.options and VARIANTS[self.options.keys()[0]]
    -
    -

    Lovely.

    -
    - -
    -
    -

    Comments !

    -
    - - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/archives.html b/pelican/tests/output/custom_locale/archives.html deleted file mode 100644 index 66dbe94a..00000000 --- a/pelican/tests/output/custom_locale/archives.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - Alexis' log - - - - - - - -Fork me on GitHub - - -
    -

    Archives for Alexis' log

    - -
    -
    30 novembre 2012
    -
    FILENAME_METADATA example
    -
    29 février 2012
    -
    Second article
    -
    20 avril 2011
    -
    A markdown powered article
    -
    17 février 2011
    -
    Article 1
    -
    17 février 2011
    -
    Article 2
    -
    17 février 2011
    -
    Article 3
    -
    02 décembre 2010
    -
    This is a super article !
    -
    20 octobre 2010
    -
    Oh yeah !
    -
    15 octobre 2010
    -
    Unbelievable !
    -
    14 mars 2010
    -
    The baz tag
    -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/author/alexis-metaireau.html b/pelican/tests/output/custom_locale/author/alexis-metaireau.html deleted file mode 100644 index 68054d97..00000000 --- a/pelican/tests/output/custom_locale/author/alexis-metaireau.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - Alexis' log - Alexis Métaireau - - - - - - - -Fork me on GitHub - - - - -
    -

    Other articles

    -
    -
      - -
    1. - -
    2. - -
    3. -
    -

    - Page 1 / 3 - » - -

    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/author/alexis-metaireau2.html b/pelican/tests/output/custom_locale/author/alexis-metaireau2.html deleted file mode 100644 index 16431fb9..00000000 --- a/pelican/tests/output/custom_locale/author/alexis-metaireau2.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - Alexis' log - Alexis Métaireau - - - - - - - -Fork me on GitHub - - - -
    -
      -
    1. - -
    2. - -
    3. - -
    4. -
      -

      Oh yeah !

      -
      - -
      -
      -

      Why not ?

      -

      After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !

      -alternate text -
      - - read more -

      There are comments.

      -
    5. -
    -

    - - « - Page 2 / 3 - » - -

    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/author/alexis-metaireau3.html b/pelican/tests/output/custom_locale/author/alexis-metaireau3.html deleted file mode 100644 index ab91c56a..00000000 --- a/pelican/tests/output/custom_locale/author/alexis-metaireau3.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - Alexis' log - Alexis Métaireau - - - - - - - -Fork me on GitHub - - - -
    -
      -
    1. - -
    2. -
    -

    - - « - Page 3 / 3 -

    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/authors.html b/pelican/tests/output/custom_locale/authors.html deleted file mode 100644 index 84bd502e..00000000 --- a/pelican/tests/output/custom_locale/authors.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - Alexis' log - Authors - - - - - - - -Fork me on GitHub - - - -
    -

    Authors on Alexis' log

    - -
    - -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/categories.html b/pelican/tests/output/custom_locale/categories.html deleted file mode 100644 index 24e83abf..00000000 --- a/pelican/tests/output/custom_locale/categories.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - Alexis' log - Categories - - - - - - - -Fork me on GitHub - - -

    Categories on Alexis' log

    - -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/category/bar.html b/pelican/tests/output/custom_locale/category/bar.html deleted file mode 100644 index f9d47948..00000000 --- a/pelican/tests/output/custom_locale/category/bar.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - Alexis' log - bar - - - - - - - -Fork me on GitHub - - - - -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/category/cat1.html b/pelican/tests/output/custom_locale/category/cat1.html deleted file mode 100644 index 2bc756e6..00000000 --- a/pelican/tests/output/custom_locale/category/cat1.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - Alexis' log - cat1 - - - - - - - -Fork me on GitHub - - - - -
    -

    Other articles

    -
    -
      - -
    1. - -
    2. - -
    3. -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/category/misc.html b/pelican/tests/output/custom_locale/category/misc.html deleted file mode 100644 index eb98db2a..00000000 --- a/pelican/tests/output/custom_locale/category/misc.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - Alexis' log - misc - - - - - - - -Fork me on GitHub - - - - -
    -

    Other articles

    -
    -
      - -
    1. - -
    2. - -
    3. -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/category/yeah.html b/pelican/tests/output/custom_locale/category/yeah.html deleted file mode 100644 index 660c593c..00000000 --- a/pelican/tests/output/custom_locale/category/yeah.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - Alexis' log - yeah - - - - - - - -Fork me on GitHub - - - - -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/drafts/a-draft-article-without-date.html b/pelican/tests/output/custom_locale/drafts/a-draft-article-without-date.html deleted file mode 100644 index c289ec72..00000000 --- a/pelican/tests/output/custom_locale/drafts/a-draft-article-without-date.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - A draft article without date - - - - - - - - -Fork me on GitHub - - -
    - -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/drafts/a-draft-article.html b/pelican/tests/output/custom_locale/drafts/a-draft-article.html deleted file mode 100644 index a166efdf..00000000 --- a/pelican/tests/output/custom_locale/drafts/a-draft-article.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - A draft article - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - A draft article

    -
    - -
    -

    This is a draft article, it should live under the /drafts/ folder and not be -listed anywhere else.

    - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/feeds/alexis-metaireau.atom.xml b/pelican/tests/output/custom_locale/feeds/alexis-metaireau.atom.xml deleted file mode 100644 index a2ee64e6..00000000 --- a/pelican/tests/output/custom_locale/feeds/alexis-metaireau.atom.xml +++ /dev/null @@ -1,74 +0,0 @@ - -Alexis' log - Alexis Métaireauhttp://blog.notmyidea.org/2013-11-17T23:29:00+01:00FILENAME_METADATA example2012-11-30T00:00:00+01:002012-11-30T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2012-11-30:/posts/2012/novembre/30/filename_metadata-example/<p>Some cool stuff!</p> -Second article2012-02-29T00:00:00+01:002012-02-29T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2012-02-29:/posts/2012/février/29/second-article/<p>This is some article, in english</p> -A markdown powered article2011-04-20T00:00:00+02:002011-04-20T00:00:00+02:00Alexis Métaireautag:blog.notmyidea.org,2011-04-20:/posts/2011/avril/20/a-markdown-powered-article/<p>You're mutually oblivious.</p> -<p><a href="http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/">a root-relative link to unbelievable</a> -<a href="http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/">a file-relative link to unbelievable</a></p>Article 12011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-1/<p>Article 1</p> -Article 22011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-2/<p>Article 2</p> -Article 32011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-3/<p>Article 3</p> -This is a super article !2010-12-02T10:14:00+01:002013-11-17T23:29:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-12-02:/posts/2010/décembre/02/this-is-a-super-article/<p class="first last">Multi-line metadata should be supported -as well as <strong>inline markup</strong>.</p> -<p>Some content here !</p> -<div class="section" id="this-is-a-simple-title"> -<h2>This is a simple title</h2> -<p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /> -<pre class="literal-block"> -&gt;&gt;&gt; from ipdb import set_trace -&gt;&gt;&gt; set_trace() -</pre> -<p>→ And now try with some utf8 hell: ééé</p> -</div> -Oh yeah !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/posts/2010/octobre/20/oh-yeah/<div class="section" id="why-not"> -<h2>Why not ?</h2> -<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !</p> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> -Unbelievable !2010-10-15T20:30:00+02:002010-10-15T20:30:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-15:/posts/2010/octobre/15/unbelievable/<p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a root-relative link to markdown-article</a> -<a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div><p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a root-relative link to markdown-article</a> -<a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will have nothing in default.</p> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table><p>Lovely.</p> -</div> -<div class="section" id="testing-more-sourcecode-directives"> -<h2>Testing more sourcecode directives</h2> -<div class="highlight"><pre><span></span><span id="foo-8"><a name="foo-8"></a><a href="#foo-8"><span class="linenos special"> 8</span></a><span class="testingk">def</span> <span class="testingnf">run</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingp">):</span><br></span><span id="foo-9"><a name="foo-9"></a><a href="#foo-9"><span class="linenos"> </span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">assert_has_content</span><span class="testingp">()</span><br></span><span id="foo-10"><a name="foo-10"></a><a href="#foo-10"><span class="linenos special">10</span></a> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a name="foo-11"></a><a href="#foo-11"><span class="linenos"> </span></a> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">get_lexer_by_name</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">arguments</span><span class="testingp">[</span><span class="testingmi">0</span><span class="testingp">])</span><br></span><span id="foo-12"><a name="foo-12"></a><a href="#foo-12"><span class="linenos special">12</span></a> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a name="foo-13"></a><a href="#foo-13"><span class="linenos"> </span></a> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a name="foo-14"></a><a href="#foo-14"><span class="linenos special">14</span></a> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">TextLexer</span><span class="testingp">()</span><br></span><span id="foo-15"><a name="foo-15"></a><a href="#foo-15"><span class="linenos"> </span></a><br></span><span id="foo-16"><a name="foo-16"></a><a href="#foo-16"><span class="linenos special">16</span></a> <span class="testingk">if</span> <span class="testingp">(</span><span class="testings1">&#39;linenos&#39;</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span> <span class="testingow">and</span><br></span><span id="foo-17"><a name="foo-17"></a><a href="#foo-17"><span class="linenos"> </span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingow">not</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;table&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;inline&#39;</span><span class="testingp">)):</span><br></span><span id="foo-18"><a name="foo-18"></a><a href="#foo-18"><span class="linenos special">18</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testings1">&#39;table&#39;</span><br></span><span id="foo-19"><a name="foo-19"></a><a href="#foo-19"><span class="linenos"> </span></a><br></span><span id="foo-20"><a name="foo-20"></a><a href="#foo-20"><span class="linenos special">20</span></a> <span class="testingk">for</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;nowrap&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;nobackground&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;anchorlinenos&#39;</span><span class="testingp">):</span><br></span><span id="foo-21"><a name="foo-21"></a><a href="#foo-21"><span class="linenos"> </span></a> <span class="testingk">if</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">:</span><br></span><span id="foo-22"><a name="foo-22"></a><a href="#foo-22"><span class="linenos special">22</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testingn">flag</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testingkc">True</span><br></span><span id="foo-23"><a name="foo-23"></a><a href="#foo-23"><span class="linenos"> </span></a><br></span><span id="foo-24"><a name="foo-24"></a><a href="#foo-24"><span class="linenos special">24</span></a> <span class="testingc1"># noclasses should already default to False, but just in case...</span><br></span><span id="foo-25"><a name="foo-25"></a><a href="#foo-25"><span class="linenos"> </span></a> <span class="testingn">formatter</span> <span class="testingo">=</span> <span class="testingn">HtmlFormatter</span><span class="testingp">(</span><span class="testingn">noclasses</span><span class="testingo">=</span><span class="testingkc">False</span><span class="testingp">,</span> <span class="testingo">**</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">)</span><br></span><span id="foo-26"><a name="foo-26"></a><a href="#foo-26"><span class="linenos special">26</span></a> <span class="testingn">parsed</span> <span class="testingo">=</span> <span class="testingn">highlight</span><span class="testingp">(</span><span class="testings1">&#39;</span><span class="testingse">\n</span><span class="testings1">&#39;</span><span class="testingo">.</span><span class="testingn">join</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">content</span><span class="testingp">),</span> <span class="testingn">lexer</span><span class="testingp">,</span> <span class="testingn">formatter</span><span class="testingp">)</span><br></span><span id="foo-27"><a name="foo-27"></a><a href="#foo-27"><span class="linenos"> </span></a> <span class="testingk">return</span> <span class="testingp">[</span><span class="testingn">nodes</span><span class="testingo">.</span><span class="testingn">raw</span><span class="testingp">(</span><span class="testings1">&#39;&#39;</span><span class="testingp">,</span> <span class="testingn">parsed</span><span class="testingp">,</span> <span class="testingnb">format</span><span class="testingo">=</span><span class="testings1">&#39;html&#39;</span><span class="testingp">)]</span><br></span></pre></div> -<p>Lovely.</p> -</div> -<div class="section" id="testing-even-more-sourcecode-directives"> -<h2>Testing even more sourcecode directives</h2> -<span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -<p>Lovely.</p> -</div> -<div class="section" id="testing-overriding-config-defaults"> -<h2>Testing overriding config defaults</h2> -<p>Even if the default is line numbers, we can override it here</p> -<div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -<p>Lovely.</p> -</div> -The baz tag2010-03-14T00:00:00+01:002010-03-14T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-03-14:/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/feeds/alexis-metaireau.rss.xml b/pelican/tests/output/custom_locale/feeds/alexis-metaireau.rss.xml deleted file mode 100644 index 6b360712..00000000 --- a/pelican/tests/output/custom_locale/feeds/alexis-metaireau.rss.xml +++ /dev/null @@ -1,29 +0,0 @@ - -Alexis' log - Alexis Métaireauhttp://blog.notmyidea.org/Sun, 17 Nov 2013 23:29:00 +0100FILENAME_METADATA examplehttp://blog.notmyidea.org/posts/2012/novembre/30/filename_metadata-example/<p>Some cool stuff!</p> -Alexis MétaireauFri, 30 Nov 2012 00:00:00 +0100tag:blog.notmyidea.org,2012-11-30:/posts/2012/novembre/30/filename_metadata-example/miscSecond articlehttp://blog.notmyidea.org/posts/2012/f%C3%A9vrier/29/second-article/<p>This is some article, in english</p> -Alexis MétaireauWed, 29 Feb 2012 00:00:00 +0100tag:blog.notmyidea.org,2012-02-29:/posts/2012/février/29/second-article/miscfoobarbazA markdown powered articlehttp://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/<p>You're mutually oblivious.</p> -<p><a href="http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/">a root-relative link to unbelievable</a> -<a href="http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/">a file-relative link to unbelievable</a></p>Alexis MétaireauWed, 20 Apr 2011 00:00:00 +0200tag:blog.notmyidea.org,2011-04-20:/posts/2011/avril/20/a-markdown-powered-article/cat1Article 1http://blog.notmyidea.org/posts/2011/f%C3%A9vrier/17/article-1/<p>Article 1</p> -Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-1/cat1Article 2http://blog.notmyidea.org/posts/2011/f%C3%A9vrier/17/article-2/<p>Article 2</p> -Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-2/cat1Article 3http://blog.notmyidea.org/posts/2011/f%C3%A9vrier/17/article-3/<p>Article 3</p> -Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-3/cat1This is a super article !http://blog.notmyidea.org/posts/2010/d%C3%A9cembre/02/this-is-a-super-article/<p class="first last">Multi-line metadata should be supported -as well as <strong>inline markup</strong>.</p> -Alexis MétaireauThu, 02 Dec 2010 10:14:00 +0100tag:blog.notmyidea.org,2010-12-02:/posts/2010/décembre/02/this-is-a-super-article/yeahfoobarfoobarOh yeah !http://blog.notmyidea.org/posts/2010/octobre/20/oh-yeah/<div class="section" id="why-not"> -<h2>Why not ?</h2> -<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !</p> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> -Alexis MétaireauWed, 20 Oct 2010 10:14:00 +0200tag:blog.notmyidea.org,2010-10-20:/posts/2010/octobre/20/oh-yeah/barohbaryeahUnbelievable !http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/<p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a root-relative link to markdown-article</a> -<a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div>Alexis MétaireauFri, 15 Oct 2010 20:30:00 +0200tag:blog.notmyidea.org,2010-10-15:/posts/2010/octobre/15/unbelievable/miscThe baz taghttp://blog.notmyidea.org/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> -Alexis MétaireauSun, 14 Mar 2010 00:00:00 +0100tag:blog.notmyidea.org,2010-03-14:/tag/baz.htmlmisc \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/feeds/all-en.atom.xml b/pelican/tests/output/custom_locale/feeds/all-en.atom.xml deleted file mode 100644 index a768d4e6..00000000 --- a/pelican/tests/output/custom_locale/feeds/all-en.atom.xml +++ /dev/null @@ -1,74 +0,0 @@ - -Alexis' loghttp://blog.notmyidea.org/2013-11-17T23:29:00+01:00FILENAME_METADATA example2012-11-30T00:00:00+01:002012-11-30T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2012-11-30:/posts/2012/novembre/30/filename_metadata-example/<p>Some cool stuff!</p> -Second article2012-02-29T00:00:00+01:002012-02-29T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2012-02-29:/posts/2012/février/29/second-article/<p>This is some article, in english</p> -A markdown powered article2011-04-20T00:00:00+02:002011-04-20T00:00:00+02:00Alexis Métaireautag:blog.notmyidea.org,2011-04-20:/posts/2011/avril/20/a-markdown-powered-article/<p>You're mutually oblivious.</p> -<p><a href="http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/">a root-relative link to unbelievable</a> -<a href="http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/">a file-relative link to unbelievable</a></p>Article 12011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-1/<p>Article 1</p> -Article 22011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-2/<p>Article 2</p> -Article 32011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-3/<p>Article 3</p> -This is a super article !2010-12-02T10:14:00+01:002013-11-17T23:29:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-12-02:/posts/2010/décembre/02/this-is-a-super-article/<p class="first last">Multi-line metadata should be supported -as well as <strong>inline markup</strong>.</p> -<p>Some content here !</p> -<div class="section" id="this-is-a-simple-title"> -<h2>This is a simple title</h2> -<p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /> -<pre class="literal-block"> -&gt;&gt;&gt; from ipdb import set_trace -&gt;&gt;&gt; set_trace() -</pre> -<p>→ And now try with some utf8 hell: ééé</p> -</div> -Oh yeah !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/posts/2010/octobre/20/oh-yeah/<div class="section" id="why-not"> -<h2>Why not ?</h2> -<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !</p> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> -Unbelievable !2010-10-15T20:30:00+02:002010-10-15T20:30:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-15:/posts/2010/octobre/15/unbelievable/<p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a root-relative link to markdown-article</a> -<a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div><p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a root-relative link to markdown-article</a> -<a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will have nothing in default.</p> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table><p>Lovely.</p> -</div> -<div class="section" id="testing-more-sourcecode-directives"> -<h2>Testing more sourcecode directives</h2> -<div class="highlight"><pre><span></span><span id="foo-8"><a name="foo-8"></a><a href="#foo-8"><span class="linenos special"> 8</span></a><span class="testingk">def</span> <span class="testingnf">run</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingp">):</span><br></span><span id="foo-9"><a name="foo-9"></a><a href="#foo-9"><span class="linenos"> </span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">assert_has_content</span><span class="testingp">()</span><br></span><span id="foo-10"><a name="foo-10"></a><a href="#foo-10"><span class="linenos special">10</span></a> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a name="foo-11"></a><a href="#foo-11"><span class="linenos"> </span></a> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">get_lexer_by_name</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">arguments</span><span class="testingp">[</span><span class="testingmi">0</span><span class="testingp">])</span><br></span><span id="foo-12"><a name="foo-12"></a><a href="#foo-12"><span class="linenos special">12</span></a> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a name="foo-13"></a><a href="#foo-13"><span class="linenos"> </span></a> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a name="foo-14"></a><a href="#foo-14"><span class="linenos special">14</span></a> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">TextLexer</span><span class="testingp">()</span><br></span><span id="foo-15"><a name="foo-15"></a><a href="#foo-15"><span class="linenos"> </span></a><br></span><span id="foo-16"><a name="foo-16"></a><a href="#foo-16"><span class="linenos special">16</span></a> <span class="testingk">if</span> <span class="testingp">(</span><span class="testings1">&#39;linenos&#39;</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span> <span class="testingow">and</span><br></span><span id="foo-17"><a name="foo-17"></a><a href="#foo-17"><span class="linenos"> </span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingow">not</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;table&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;inline&#39;</span><span class="testingp">)):</span><br></span><span id="foo-18"><a name="foo-18"></a><a href="#foo-18"><span class="linenos special">18</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testings1">&#39;table&#39;</span><br></span><span id="foo-19"><a name="foo-19"></a><a href="#foo-19"><span class="linenos"> </span></a><br></span><span id="foo-20"><a name="foo-20"></a><a href="#foo-20"><span class="linenos special">20</span></a> <span class="testingk">for</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;nowrap&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;nobackground&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;anchorlinenos&#39;</span><span class="testingp">):</span><br></span><span id="foo-21"><a name="foo-21"></a><a href="#foo-21"><span class="linenos"> </span></a> <span class="testingk">if</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">:</span><br></span><span id="foo-22"><a name="foo-22"></a><a href="#foo-22"><span class="linenos special">22</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testingn">flag</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testingkc">True</span><br></span><span id="foo-23"><a name="foo-23"></a><a href="#foo-23"><span class="linenos"> </span></a><br></span><span id="foo-24"><a name="foo-24"></a><a href="#foo-24"><span class="linenos special">24</span></a> <span class="testingc1"># noclasses should already default to False, but just in case...</span><br></span><span id="foo-25"><a name="foo-25"></a><a href="#foo-25"><span class="linenos"> </span></a> <span class="testingn">formatter</span> <span class="testingo">=</span> <span class="testingn">HtmlFormatter</span><span class="testingp">(</span><span class="testingn">noclasses</span><span class="testingo">=</span><span class="testingkc">False</span><span class="testingp">,</span> <span class="testingo">**</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">)</span><br></span><span id="foo-26"><a name="foo-26"></a><a href="#foo-26"><span class="linenos special">26</span></a> <span class="testingn">parsed</span> <span class="testingo">=</span> <span class="testingn">highlight</span><span class="testingp">(</span><span class="testings1">&#39;</span><span class="testingse">\n</span><span class="testings1">&#39;</span><span class="testingo">.</span><span class="testingn">join</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">content</span><span class="testingp">),</span> <span class="testingn">lexer</span><span class="testingp">,</span> <span class="testingn">formatter</span><span class="testingp">)</span><br></span><span id="foo-27"><a name="foo-27"></a><a href="#foo-27"><span class="linenos"> </span></a> <span class="testingk">return</span> <span class="testingp">[</span><span class="testingn">nodes</span><span class="testingo">.</span><span class="testingn">raw</span><span class="testingp">(</span><span class="testings1">&#39;&#39;</span><span class="testingp">,</span> <span class="testingn">parsed</span><span class="testingp">,</span> <span class="testingnb">format</span><span class="testingo">=</span><span class="testings1">&#39;html&#39;</span><span class="testingp">)]</span><br></span></pre></div> -<p>Lovely.</p> -</div> -<div class="section" id="testing-even-more-sourcecode-directives"> -<h2>Testing even more sourcecode directives</h2> -<span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -<p>Lovely.</p> -</div> -<div class="section" id="testing-overriding-config-defaults"> -<h2>Testing overriding config defaults</h2> -<p>Even if the default is line numbers, we can override it here</p> -<div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -<p>Lovely.</p> -</div> -The baz tag2010-03-14T00:00:00+01:002010-03-14T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-03-14:/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/feeds/all-fr.atom.xml b/pelican/tests/output/custom_locale/feeds/all-fr.atom.xml deleted file mode 100644 index cfd6eeb2..00000000 --- a/pelican/tests/output/custom_locale/feeds/all-fr.atom.xml +++ /dev/null @@ -1,4 +0,0 @@ - -Alexis' loghttp://blog.notmyidea.org/2012-02-29T00:00:00+01:00Deuxième article2012-02-29T00:00:00+01:002012-02-29T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2012-02-29:/second-article-fr.html<p>Ceci est un article, en français.</p> -Trop bien !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/oh-yeah-fr.html<p>Et voila du contenu en français</p> - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/feeds/all.atom.xml b/pelican/tests/output/custom_locale/feeds/all.atom.xml deleted file mode 100644 index 4680594a..00000000 --- a/pelican/tests/output/custom_locale/feeds/all.atom.xml +++ /dev/null @@ -1,76 +0,0 @@ - -Alexis' loghttp://blog.notmyidea.org/2013-11-17T23:29:00+01:00FILENAME_METADATA example2012-11-30T00:00:00+01:002012-11-30T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2012-11-30:/posts/2012/novembre/30/filename_metadata-example/<p>Some cool stuff!</p> -Second article2012-02-29T00:00:00+01:002012-02-29T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2012-02-29:/posts/2012/février/29/second-article/<p>This is some article, in english</p> -Deuxième article2012-02-29T00:00:00+01:002012-02-29T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2012-02-29:/second-article-fr.html<p>Ceci est un article, en français.</p> -A markdown powered article2011-04-20T00:00:00+02:002011-04-20T00:00:00+02:00Alexis Métaireautag:blog.notmyidea.org,2011-04-20:/posts/2011/avril/20/a-markdown-powered-article/<p>You're mutually oblivious.</p> -<p><a href="http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/">a root-relative link to unbelievable</a> -<a href="http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/">a file-relative link to unbelievable</a></p>Article 12011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-1/<p>Article 1</p> -Article 22011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-2/<p>Article 2</p> -Article 32011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-3/<p>Article 3</p> -This is a super article !2010-12-02T10:14:00+01:002013-11-17T23:29:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-12-02:/posts/2010/décembre/02/this-is-a-super-article/<p class="first last">Multi-line metadata should be supported -as well as <strong>inline markup</strong>.</p> -<p>Some content here !</p> -<div class="section" id="this-is-a-simple-title"> -<h2>This is a simple title</h2> -<p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /> -<pre class="literal-block"> -&gt;&gt;&gt; from ipdb import set_trace -&gt;&gt;&gt; set_trace() -</pre> -<p>→ And now try with some utf8 hell: ééé</p> -</div> -Oh yeah !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/posts/2010/octobre/20/oh-yeah/<div class="section" id="why-not"> -<h2>Why not ?</h2> -<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !</p> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> -Trop bien !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/oh-yeah-fr.html<p>Et voila du contenu en français</p> -Unbelievable !2010-10-15T20:30:00+02:002010-10-15T20:30:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-15:/posts/2010/octobre/15/unbelievable/<p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a root-relative link to markdown-article</a> -<a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div><p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a root-relative link to markdown-article</a> -<a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will have nothing in default.</p> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table><p>Lovely.</p> -</div> -<div class="section" id="testing-more-sourcecode-directives"> -<h2>Testing more sourcecode directives</h2> -<div class="highlight"><pre><span></span><span id="foo-8"><a name="foo-8"></a><a href="#foo-8"><span class="linenos special"> 8</span></a><span class="testingk">def</span> <span class="testingnf">run</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingp">):</span><br></span><span id="foo-9"><a name="foo-9"></a><a href="#foo-9"><span class="linenos"> </span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">assert_has_content</span><span class="testingp">()</span><br></span><span id="foo-10"><a name="foo-10"></a><a href="#foo-10"><span class="linenos special">10</span></a> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a name="foo-11"></a><a href="#foo-11"><span class="linenos"> </span></a> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">get_lexer_by_name</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">arguments</span><span class="testingp">[</span><span class="testingmi">0</span><span class="testingp">])</span><br></span><span id="foo-12"><a name="foo-12"></a><a href="#foo-12"><span class="linenos special">12</span></a> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a name="foo-13"></a><a href="#foo-13"><span class="linenos"> </span></a> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a name="foo-14"></a><a href="#foo-14"><span class="linenos special">14</span></a> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">TextLexer</span><span class="testingp">()</span><br></span><span id="foo-15"><a name="foo-15"></a><a href="#foo-15"><span class="linenos"> </span></a><br></span><span id="foo-16"><a name="foo-16"></a><a href="#foo-16"><span class="linenos special">16</span></a> <span class="testingk">if</span> <span class="testingp">(</span><span class="testings1">&#39;linenos&#39;</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span> <span class="testingow">and</span><br></span><span id="foo-17"><a name="foo-17"></a><a href="#foo-17"><span class="linenos"> </span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingow">not</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;table&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;inline&#39;</span><span class="testingp">)):</span><br></span><span id="foo-18"><a name="foo-18"></a><a href="#foo-18"><span class="linenos special">18</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testings1">&#39;table&#39;</span><br></span><span id="foo-19"><a name="foo-19"></a><a href="#foo-19"><span class="linenos"> </span></a><br></span><span id="foo-20"><a name="foo-20"></a><a href="#foo-20"><span class="linenos special">20</span></a> <span class="testingk">for</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;nowrap&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;nobackground&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;anchorlinenos&#39;</span><span class="testingp">):</span><br></span><span id="foo-21"><a name="foo-21"></a><a href="#foo-21"><span class="linenos"> </span></a> <span class="testingk">if</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">:</span><br></span><span id="foo-22"><a name="foo-22"></a><a href="#foo-22"><span class="linenos special">22</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testingn">flag</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testingkc">True</span><br></span><span id="foo-23"><a name="foo-23"></a><a href="#foo-23"><span class="linenos"> </span></a><br></span><span id="foo-24"><a name="foo-24"></a><a href="#foo-24"><span class="linenos special">24</span></a> <span class="testingc1"># noclasses should already default to False, but just in case...</span><br></span><span id="foo-25"><a name="foo-25"></a><a href="#foo-25"><span class="linenos"> </span></a> <span class="testingn">formatter</span> <span class="testingo">=</span> <span class="testingn">HtmlFormatter</span><span class="testingp">(</span><span class="testingn">noclasses</span><span class="testingo">=</span><span class="testingkc">False</span><span class="testingp">,</span> <span class="testingo">**</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">)</span><br></span><span id="foo-26"><a name="foo-26"></a><a href="#foo-26"><span class="linenos special">26</span></a> <span class="testingn">parsed</span> <span class="testingo">=</span> <span class="testingn">highlight</span><span class="testingp">(</span><span class="testings1">&#39;</span><span class="testingse">\n</span><span class="testings1">&#39;</span><span class="testingo">.</span><span class="testingn">join</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">content</span><span class="testingp">),</span> <span class="testingn">lexer</span><span class="testingp">,</span> <span class="testingn">formatter</span><span class="testingp">)</span><br></span><span id="foo-27"><a name="foo-27"></a><a href="#foo-27"><span class="linenos"> </span></a> <span class="testingk">return</span> <span class="testingp">[</span><span class="testingn">nodes</span><span class="testingo">.</span><span class="testingn">raw</span><span class="testingp">(</span><span class="testings1">&#39;&#39;</span><span class="testingp">,</span> <span class="testingn">parsed</span><span class="testingp">,</span> <span class="testingnb">format</span><span class="testingo">=</span><span class="testings1">&#39;html&#39;</span><span class="testingp">)]</span><br></span></pre></div> -<p>Lovely.</p> -</div> -<div class="section" id="testing-even-more-sourcecode-directives"> -<h2>Testing even more sourcecode directives</h2> -<span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -<p>Lovely.</p> -</div> -<div class="section" id="testing-overriding-config-defaults"> -<h2>Testing overriding config defaults</h2> -<p>Even if the default is line numbers, we can override it here</p> -<div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -<p>Lovely.</p> -</div> -The baz tag2010-03-14T00:00:00+01:002010-03-14T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-03-14:/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/feeds/all.rss.xml b/pelican/tests/output/custom_locale/feeds/all.rss.xml deleted file mode 100644 index dc4ef033..00000000 --- a/pelican/tests/output/custom_locale/feeds/all.rss.xml +++ /dev/null @@ -1,31 +0,0 @@ - -Alexis' loghttp://blog.notmyidea.org/Sun, 17 Nov 2013 23:29:00 +0100FILENAME_METADATA examplehttp://blog.notmyidea.org/posts/2012/novembre/30/filename_metadata-example/<p>Some cool stuff!</p> -Alexis MétaireauFri, 30 Nov 2012 00:00:00 +0100tag:blog.notmyidea.org,2012-11-30:/posts/2012/novembre/30/filename_metadata-example/miscSecond articlehttp://blog.notmyidea.org/posts/2012/f%C3%A9vrier/29/second-article/<p>This is some article, in english</p> -Alexis MétaireauWed, 29 Feb 2012 00:00:00 +0100tag:blog.notmyidea.org,2012-02-29:/posts/2012/février/29/second-article/miscfoobarbazDeuxième articlehttp://blog.notmyidea.org/second-article-fr.html<p>Ceci est un article, en français.</p> -Alexis MétaireauWed, 29 Feb 2012 00:00:00 +0100tag:blog.notmyidea.org,2012-02-29:/second-article-fr.htmlmiscfoobarbazA markdown powered articlehttp://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/<p>You're mutually oblivious.</p> -<p><a href="http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/">a root-relative link to unbelievable</a> -<a href="http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/">a file-relative link to unbelievable</a></p>Alexis MétaireauWed, 20 Apr 2011 00:00:00 +0200tag:blog.notmyidea.org,2011-04-20:/posts/2011/avril/20/a-markdown-powered-article/cat1Article 1http://blog.notmyidea.org/posts/2011/f%C3%A9vrier/17/article-1/<p>Article 1</p> -Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-1/cat1Article 2http://blog.notmyidea.org/posts/2011/f%C3%A9vrier/17/article-2/<p>Article 2</p> -Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-2/cat1Article 3http://blog.notmyidea.org/posts/2011/f%C3%A9vrier/17/article-3/<p>Article 3</p> -Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-3/cat1This is a super article !http://blog.notmyidea.org/posts/2010/d%C3%A9cembre/02/this-is-a-super-article/<p class="first last">Multi-line metadata should be supported -as well as <strong>inline markup</strong>.</p> -Alexis MétaireauThu, 02 Dec 2010 10:14:00 +0100tag:blog.notmyidea.org,2010-12-02:/posts/2010/décembre/02/this-is-a-super-article/yeahfoobarfoobarOh yeah !http://blog.notmyidea.org/posts/2010/octobre/20/oh-yeah/<div class="section" id="why-not"> -<h2>Why not ?</h2> -<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !</p> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> -Alexis MétaireauWed, 20 Oct 2010 10:14:00 +0200tag:blog.notmyidea.org,2010-10-20:/posts/2010/octobre/20/oh-yeah/barohbaryeahTrop bien !http://blog.notmyidea.org/oh-yeah-fr.html<p>Et voila du contenu en français</p> -Alexis MétaireauWed, 20 Oct 2010 10:14:00 +0200tag:blog.notmyidea.org,2010-10-20:/oh-yeah-fr.htmlmiscUnbelievable !http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/<p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a root-relative link to markdown-article</a> -<a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div>Alexis MétaireauFri, 15 Oct 2010 20:30:00 +0200tag:blog.notmyidea.org,2010-10-15:/posts/2010/octobre/15/unbelievable/miscThe baz taghttp://blog.notmyidea.org/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> -Alexis MétaireauSun, 14 Mar 2010 00:00:00 +0100tag:blog.notmyidea.org,2010-03-14:/tag/baz.htmlmisc \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/feeds/bar.atom.xml b/pelican/tests/output/custom_locale/feeds/bar.atom.xml deleted file mode 100644 index d4467ea7..00000000 --- a/pelican/tests/output/custom_locale/feeds/bar.atom.xml +++ /dev/null @@ -1,8 +0,0 @@ - -Alexis' log - barhttp://blog.notmyidea.org/2010-10-20T10:14:00+02:00Oh yeah !2010-10-20T10:14:00+02:002010-10-20T10:14:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-20:/posts/2010/octobre/20/oh-yeah/<div class="section" id="why-not"> -<h2>Why not ?</h2> -<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !</p> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/feeds/bar.rss.xml b/pelican/tests/output/custom_locale/feeds/bar.rss.xml deleted file mode 100644 index d17d7703..00000000 --- a/pelican/tests/output/custom_locale/feeds/bar.rss.xml +++ /dev/null @@ -1,8 +0,0 @@ - -Alexis' log - barhttp://blog.notmyidea.org/Wed, 20 Oct 2010 10:14:00 +0200Oh yeah !http://blog.notmyidea.org/posts/2010/octobre/20/oh-yeah/<div class="section" id="why-not"> -<h2>Why not ?</h2> -<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !</p> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -</div> -Alexis MétaireauWed, 20 Oct 2010 10:14:00 +0200tag:blog.notmyidea.org,2010-10-20:/posts/2010/octobre/20/oh-yeah/barohbaryeah \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/feeds/cat1.atom.xml b/pelican/tests/output/custom_locale/feeds/cat1.atom.xml deleted file mode 100644 index 87a822e5..00000000 --- a/pelican/tests/output/custom_locale/feeds/cat1.atom.xml +++ /dev/null @@ -1,7 +0,0 @@ - -Alexis' log - cat1http://blog.notmyidea.org/2011-04-20T00:00:00+02:00A markdown powered article2011-04-20T00:00:00+02:002011-04-20T00:00:00+02:00Alexis Métaireautag:blog.notmyidea.org,2011-04-20:/posts/2011/avril/20/a-markdown-powered-article/<p>You're mutually oblivious.</p> -<p><a href="http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/">a root-relative link to unbelievable</a> -<a href="http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/">a file-relative link to unbelievable</a></p>Article 12011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-1/<p>Article 1</p> -Article 22011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-2/<p>Article 2</p> -Article 32011-02-17T00:00:00+01:002011-02-17T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-3/<p>Article 3</p> - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/feeds/cat1.rss.xml b/pelican/tests/output/custom_locale/feeds/cat1.rss.xml deleted file mode 100644 index 6b328fda..00000000 --- a/pelican/tests/output/custom_locale/feeds/cat1.rss.xml +++ /dev/null @@ -1,7 +0,0 @@ - -Alexis' log - cat1http://blog.notmyidea.org/Wed, 20 Apr 2011 00:00:00 +0200A markdown powered articlehttp://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/<p>You're mutually oblivious.</p> -<p><a href="http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/">a root-relative link to unbelievable</a> -<a href="http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/">a file-relative link to unbelievable</a></p>Alexis MétaireauWed, 20 Apr 2011 00:00:00 +0200tag:blog.notmyidea.org,2011-04-20:/posts/2011/avril/20/a-markdown-powered-article/cat1Article 1http://blog.notmyidea.org/posts/2011/f%C3%A9vrier/17/article-1/<p>Article 1</p> -Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-1/cat1Article 2http://blog.notmyidea.org/posts/2011/f%C3%A9vrier/17/article-2/<p>Article 2</p> -Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-2/cat1Article 3http://blog.notmyidea.org/posts/2011/f%C3%A9vrier/17/article-3/<p>Article 3</p> -Alexis MétaireauThu, 17 Feb 2011 00:00:00 +0100tag:blog.notmyidea.org,2011-02-17:/posts/2011/février/17/article-3/cat1 \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/feeds/misc.atom.xml b/pelican/tests/output/custom_locale/feeds/misc.atom.xml deleted file mode 100644 index eb7a72f7..00000000 --- a/pelican/tests/output/custom_locale/feeds/misc.atom.xml +++ /dev/null @@ -1,49 +0,0 @@ - -Alexis' log - mischttp://blog.notmyidea.org/2012-11-30T00:00:00+01:00FILENAME_METADATA example2012-11-30T00:00:00+01:002012-11-30T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2012-11-30:/posts/2012/novembre/30/filename_metadata-example/<p>Some cool stuff!</p> -Second article2012-02-29T00:00:00+01:002012-02-29T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2012-02-29:/posts/2012/février/29/second-article/<p>This is some article, in english</p> -Unbelievable !2010-10-15T20:30:00+02:002010-10-15T20:30:00+02:00Alexis Métaireautag:blog.notmyidea.org,2010-10-15:/posts/2010/octobre/15/unbelievable/<p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a root-relative link to markdown-article</a> -<a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div><p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a root-relative link to markdown-article</a> -<a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will have nothing in default.</p> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table><p>Lovely.</p> -</div> -<div class="section" id="testing-more-sourcecode-directives"> -<h2>Testing more sourcecode directives</h2> -<div class="highlight"><pre><span></span><span id="foo-8"><a name="foo-8"></a><a href="#foo-8"><span class="linenos special"> 8</span></a><span class="testingk">def</span> <span class="testingnf">run</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingp">):</span><br></span><span id="foo-9"><a name="foo-9"></a><a href="#foo-9"><span class="linenos"> </span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">assert_has_content</span><span class="testingp">()</span><br></span><span id="foo-10"><a name="foo-10"></a><a href="#foo-10"><span class="linenos special">10</span></a> <span class="testingk">try</span><span class="testingp">:</span><br></span><span id="foo-11"><a name="foo-11"></a><a href="#foo-11"><span class="linenos"> </span></a> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">get_lexer_by_name</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">arguments</span><span class="testingp">[</span><span class="testingmi">0</span><span class="testingp">])</span><br></span><span id="foo-12"><a name="foo-12"></a><a href="#foo-12"><span class="linenos special">12</span></a> <span class="testingk">except</span> <span class="testingne">ValueError</span><span class="testingp">:</span><br></span><span id="foo-13"><a name="foo-13"></a><a href="#foo-13"><span class="linenos"> </span></a> <span class="testingc1"># no lexer found - use the text one instead of an exception</span><br></span><span id="foo-14"><a name="foo-14"></a><a href="#foo-14"><span class="linenos special">14</span></a> <span class="testingn">lexer</span> <span class="testingo">=</span> <span class="testingn">TextLexer</span><span class="testingp">()</span><br></span><span id="foo-15"><a name="foo-15"></a><a href="#foo-15"><span class="linenos"> </span></a><br></span><span id="foo-16"><a name="foo-16"></a><a href="#foo-16"><span class="linenos special">16</span></a> <span class="testingk">if</span> <span class="testingp">(</span><span class="testings1">&#39;linenos&#39;</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span> <span class="testingow">and</span><br></span><span id="foo-17"><a name="foo-17"></a><a href="#foo-17"><span class="linenos"> </span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingow">not</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;table&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;inline&#39;</span><span class="testingp">)):</span><br></span><span id="foo-18"><a name="foo-18"></a><a href="#foo-18"><span class="linenos special">18</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testings1">&#39;linenos&#39;</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testings1">&#39;table&#39;</span><br></span><span id="foo-19"><a name="foo-19"></a><a href="#foo-19"><span class="linenos"> </span></a><br></span><span id="foo-20"><a name="foo-20"></a><a href="#foo-20"><span class="linenos special">20</span></a> <span class="testingk">for</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingp">(</span><span class="testings1">&#39;nowrap&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;nobackground&#39;</span><span class="testingp">,</span> <span class="testings1">&#39;anchorlinenos&#39;</span><span class="testingp">):</span><br></span><span id="foo-21"><a name="foo-21"></a><a href="#foo-21"><span class="linenos"> </span></a> <span class="testingk">if</span> <span class="testingn">flag</span> <span class="testingow">in</span> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">:</span><br></span><span id="foo-22"><a name="foo-22"></a><a href="#foo-22"><span class="linenos special">22</span></a> <span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">[</span><span class="testingn">flag</span><span class="testingp">]</span> <span class="testingo">=</span> <span class="testingkc">True</span><br></span><span id="foo-23"><a name="foo-23"></a><a href="#foo-23"><span class="linenos"> </span></a><br></span><span id="foo-24"><a name="foo-24"></a><a href="#foo-24"><span class="linenos special">24</span></a> <span class="testingc1"># noclasses should already default to False, but just in case...</span><br></span><span id="foo-25"><a name="foo-25"></a><a href="#foo-25"><span class="linenos"> </span></a> <span class="testingn">formatter</span> <span class="testingo">=</span> <span class="testingn">HtmlFormatter</span><span class="testingp">(</span><span class="testingn">noclasses</span><span class="testingo">=</span><span class="testingkc">False</span><span class="testingp">,</span> <span class="testingo">**</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">options</span><span class="testingp">)</span><br></span><span id="foo-26"><a name="foo-26"></a><a href="#foo-26"><span class="linenos special">26</span></a> <span class="testingn">parsed</span> <span class="testingo">=</span> <span class="testingn">highlight</span><span class="testingp">(</span><span class="testings1">&#39;</span><span class="testingse">\n</span><span class="testings1">&#39;</span><span class="testingo">.</span><span class="testingn">join</span><span class="testingp">(</span><span class="testingbp">self</span><span class="testingo">.</span><span class="testingn">content</span><span class="testingp">),</span> <span class="testingn">lexer</span><span class="testingp">,</span> <span class="testingn">formatter</span><span class="testingp">)</span><br></span><span id="foo-27"><a name="foo-27"></a><a href="#foo-27"><span class="linenos"> </span></a> <span class="testingk">return</span> <span class="testingp">[</span><span class="testingn">nodes</span><span class="testingo">.</span><span class="testingn">raw</span><span class="testingp">(</span><span class="testings1">&#39;&#39;</span><span class="testingp">,</span> <span class="testingn">parsed</span><span class="testingp">,</span> <span class="testingnb">format</span><span class="testingo">=</span><span class="testings1">&#39;html&#39;</span><span class="testingp">)]</span><br></span></pre></div> -<p>Lovely.</p> -</div> -<div class="section" id="testing-even-more-sourcecode-directives"> -<h2>Testing even more sourcecode directives</h2> -<span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -<p>Lovely.</p> -</div> -<div class="section" id="testing-overriding-config-defaults"> -<h2>Testing overriding config defaults</h2> -<p>Even if the default is line numbers, we can override it here</p> -<div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -<p>Lovely.</p> -</div> -The baz tag2010-03-14T00:00:00+01:002010-03-14T00:00:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-03-14:/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/feeds/misc.rss.xml b/pelican/tests/output/custom_locale/feeds/misc.rss.xml deleted file mode 100644 index 6ac30929..00000000 --- a/pelican/tests/output/custom_locale/feeds/misc.rss.xml +++ /dev/null @@ -1,16 +0,0 @@ - -Alexis' log - mischttp://blog.notmyidea.org/Fri, 30 Nov 2012 00:00:00 +0100FILENAME_METADATA examplehttp://blog.notmyidea.org/posts/2012/novembre/30/filename_metadata-example/<p>Some cool stuff!</p> -Alexis MétaireauFri, 30 Nov 2012 00:00:00 +0100tag:blog.notmyidea.org,2012-11-30:/posts/2012/novembre/30/filename_metadata-example/miscSecond articlehttp://blog.notmyidea.org/posts/2012/f%C3%A9vrier/29/second-article/<p>This is some article, in english</p> -Alexis MétaireauWed, 29 Feb 2012 00:00:00 +0100tag:blog.notmyidea.org,2012-02-29:/posts/2012/février/29/second-article/miscfoobarbazUnbelievable !http://blog.notmyidea.org/posts/2010/octobre/15/unbelievable/<p>Or completely awesome. Depends the needs.</p> -<p><a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a root-relative link to markdown-article</a> -<a class="reference external" href="http://blog.notmyidea.org/posts/2011/avril/20/a-markdown-powered-article/">a file-relative link to markdown-article</a></p> -<div class="section" id="testing-sourcecode-directive"> -<h2>Testing sourcecode directive</h2> -<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span> -</pre></div> -</td></tr></table></div> -<div class="section" id="testing-another-case"> -<h2>Testing another case</h2> -<p>This will now have a line number in 'custom' since it's the default in -pelican.conf, it will …</p></div>Alexis MétaireauFri, 15 Oct 2010 20:30:00 +0200tag:blog.notmyidea.org,2010-10-15:/posts/2010/octobre/15/unbelievable/miscThe baz taghttp://blog.notmyidea.org/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p> -Alexis MétaireauSun, 14 Mar 2010 00:00:00 +0100tag:blog.notmyidea.org,2010-03-14:/tag/baz.htmlmisc \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/feeds/yeah.atom.xml b/pelican/tests/output/custom_locale/feeds/yeah.atom.xml deleted file mode 100644 index 6f2e5f82..00000000 --- a/pelican/tests/output/custom_locale/feeds/yeah.atom.xml +++ /dev/null @@ -1,16 +0,0 @@ - -Alexis' log - yeahhttp://blog.notmyidea.org/2013-11-17T23:29:00+01:00This is a super article !2010-12-02T10:14:00+01:002013-11-17T23:29:00+01:00Alexis Métaireautag:blog.notmyidea.org,2010-12-02:/posts/2010/décembre/02/this-is-a-super-article/<p class="first last">Multi-line metadata should be supported -as well as <strong>inline markup</strong>.</p> -<p>Some content here !</p> -<div class="section" id="this-is-a-simple-title"> -<h2>This is a simple title</h2> -<p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi.jpg" style="width: 600px; height: 450px;" /> -<img alt="alternate text" src="http://blog.notmyidea.org/pictures/Sushi_Macro.jpg" style="width: 600px; height: 450px;" /> -<pre class="literal-block"> -&gt;&gt;&gt; from ipdb import set_trace -&gt;&gt;&gt; set_trace() -</pre> -<p>→ And now try with some utf8 hell: ééé</p> -</div> - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/feeds/yeah.rss.xml b/pelican/tests/output/custom_locale/feeds/yeah.rss.xml deleted file mode 100644 index b7fb81f8..00000000 --- a/pelican/tests/output/custom_locale/feeds/yeah.rss.xml +++ /dev/null @@ -1,4 +0,0 @@ - -Alexis' log - yeahhttp://blog.notmyidea.org/Sun, 17 Nov 2013 23:29:00 +0100This is a super article !http://blog.notmyidea.org/posts/2010/d%C3%A9cembre/02/this-is-a-super-article/<p class="first last">Multi-line metadata should be supported -as well as <strong>inline markup</strong>.</p> -Alexis MétaireauThu, 02 Dec 2010 10:14:00 +0100tag:blog.notmyidea.org,2010-12-02:/posts/2010/décembre/02/this-is-a-super-article/yeahfoobarfoobar \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/index.html b/pelican/tests/output/custom_locale/index.html deleted file mode 100644 index 6e0d632d..00000000 --- a/pelican/tests/output/custom_locale/index.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - Alexis' log - - - - - - - -Fork me on GitHub - - - - -
    -

    Other articles

    -
    -
      - -
    1. - -
    2. - -
    3. -
    -

    - Page 1 / 3 - » - -

    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/index2.html b/pelican/tests/output/custom_locale/index2.html deleted file mode 100644 index 5ff21fac..00000000 --- a/pelican/tests/output/custom_locale/index2.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - Alexis' log - - - - - - - -Fork me on GitHub - - - -
    -
      -
    1. - -
    2. - -
    3. - -
    4. -
      -

      Oh yeah !

      -
      - -
      -
      -

      Why not ?

      -

      After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !

      -alternate text -
      - - read more -

      There are comments.

      -
    5. -
    -

    - - « - Page 2 / 3 - » - -

    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/index3.html b/pelican/tests/output/custom_locale/index3.html deleted file mode 100644 index 45ea5a89..00000000 --- a/pelican/tests/output/custom_locale/index3.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - Alexis' log - - - - - - - -Fork me on GitHub - - - -
    -
      -
    1. - -
    2. -
    -

    - - « - Page 3 / 3 -

    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/jinja2_template.html b/pelican/tests/output/custom_locale/jinja2_template.html deleted file mode 100644 index 83b6e8e0..00000000 --- a/pelican/tests/output/custom_locale/jinja2_template.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - Alexis' log - - - - - - - -Fork me on GitHub - - - -Some text - -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/oh-yeah-fr.html b/pelican/tests/output/custom_locale/oh-yeah-fr.html deleted file mode 100644 index 58859a3a..00000000 --- a/pelican/tests/output/custom_locale/oh-yeah-fr.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - Trop bien ! - - - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - Trop bien !

    -
    - -
    -

    Et voila du contenu en français

    - -
    -
    -

    Comments !

    -
    - - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/override/index.html b/pelican/tests/output/custom_locale/override/index.html deleted file mode 100644 index 5c273ed6..00000000 --- a/pelican/tests/output/custom_locale/override/index.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - Override url/save_as - - - - - - - -Fork me on GitHub - - -
    -

    Override url/save_as

    - -

    Test page which overrides save_as and url so that this page will be generated -at a custom location.

    - -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/pages/this-is-a-test-hidden-page.html b/pelican/tests/output/custom_locale/pages/this-is-a-test-hidden-page.html deleted file mode 100644 index 91372822..00000000 --- a/pelican/tests/output/custom_locale/pages/this-is-a-test-hidden-page.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - This is a test hidden page - - - - - - - -Fork me on GitHub - - -
    -

    This is a test hidden page

    - -

    This is great for things like error(404) pages -Anyone can see this page but it's not linked to anywhere!

    - -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/pages/this-is-a-test-page.html b/pelican/tests/output/custom_locale/pages/this-is-a-test-page.html deleted file mode 100644 index eb779355..00000000 --- a/pelican/tests/output/custom_locale/pages/this-is-a-test-page.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - This is a test page - - - - - - - -Fork me on GitHub - - -
    -

    This is a test page

    - -

    Just an image.

    -alternate text -wrong path since 'images' folder does not exist - -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/pictures/Fat_Cat.jpg b/pelican/tests/output/custom_locale/pictures/Fat_Cat.jpg deleted file mode 100644 index d8a96d35..00000000 Binary files a/pelican/tests/output/custom_locale/pictures/Fat_Cat.jpg and /dev/null differ diff --git a/pelican/tests/output/custom_locale/pictures/Sushi.jpg b/pelican/tests/output/custom_locale/pictures/Sushi.jpg deleted file mode 100644 index e49e5f0a..00000000 Binary files a/pelican/tests/output/custom_locale/pictures/Sushi.jpg and /dev/null differ diff --git a/pelican/tests/output/custom_locale/pictures/Sushi_Macro.jpg b/pelican/tests/output/custom_locale/pictures/Sushi_Macro.jpg deleted file mode 100644 index 21f935a1..00000000 Binary files a/pelican/tests/output/custom_locale/pictures/Sushi_Macro.jpg and /dev/null differ diff --git a/pelican/tests/output/custom_locale/posts/2010/décembre/02/this-is-a-super-article/index.html b/pelican/tests/output/custom_locale/posts/2010/décembre/02/this-is-a-super-article/index.html deleted file mode 100644 index dee44f28..00000000 --- a/pelican/tests/output/custom_locale/posts/2010/décembre/02/this-is-a-super-article/index.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - This is a super article ! - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - This is a super article !

    -
    - -
    -

    Some content here !

    -
    -

    This is a simple title

    -

    And here comes the cool stuff.

    -alternate text -alternate text -
    ->>> from ipdb import set_trace
    ->>> set_trace()
    -
    -

    → And now try with some utf8 hell: ééé

    -
    - -
    -
    -

    Comments !

    -
    - - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/posts/2010/octobre/15/unbelievable/index.html b/pelican/tests/output/custom_locale/posts/2010/octobre/15/unbelievable/index.html deleted file mode 100644 index 407d457f..00000000 --- a/pelican/tests/output/custom_locale/posts/2010/octobre/15/unbelievable/index.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - Unbelievable ! - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - Unbelievable !

    -
    - -
    -

    Or completely awesome. Depends the needs.

    -

    a root-relative link to markdown-article -a file-relative link to markdown-article

    -
    -

    Testing sourcecode directive

    -
    1
    formatter = self.options and VARIANTS[self.options.keys()[0]]
    -
    -
    -
    -

    Testing another case

    -

    This will now have a line number in 'custom' since it's the default in -pelican.conf, it will have nothing in default.

    -
    1
    formatter = self.options and VARIANTS[self.options.keys()[0]]
    -
    -

    Lovely.

    -
    -
    -

    Testing more sourcecode directives

    -
     8def run(self):
    self.assert_has_content()
    10 try:
    lexer = get_lexer_by_name(self.arguments[0])
    12 except ValueError:
    # no lexer found - use the text one instead of an exception
    14 lexer = TextLexer()

    16 if ('linenos' in self.options and
    self.options['linenos'] not in ('table', 'inline')):
    18 self.options['linenos'] = 'table'

    20 for flag in ('nowrap', 'nobackground', 'anchorlinenos'):
    if flag in self.options:
    22 self.options[flag] = True

    24 # noclasses should already default to False, but just in case...
    formatter = HtmlFormatter(noclasses=False, **self.options)
    26 parsed = highlight('\n'.join(self.content), lexer, formatter)
    return [nodes.raw('', parsed, format='html')]
    -

    Lovely.

    -
    -
    -

    Testing even more sourcecode directives

    -formatter = self.options and VARIANTS[self.options.keys()[0]] -

    Lovely.

    -
    -
    -

    Testing overriding config defaults

    -

    Even if the default is line numbers, we can override it here

    -
    formatter = self.options and VARIANTS[self.options.keys()[0]]
    -
    -

    Lovely.

    -
    - -
    -
    -

    Comments !

    -
    - - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/posts/2010/octobre/20/oh-yeah/index.html b/pelican/tests/output/custom_locale/posts/2010/octobre/20/oh-yeah/index.html deleted file mode 100644 index 1bf74b57..00000000 --- a/pelican/tests/output/custom_locale/posts/2010/octobre/20/oh-yeah/index.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - Oh yeah ! - - - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - Oh yeah !

    -
    - -
    -
    -

    Why not ?

    -

    After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !

    -alternate text -
    - -
    -
    -

    Comments !

    -
    - - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/posts/2011/avril/20/a-markdown-powered-article/index.html b/pelican/tests/output/custom_locale/posts/2011/avril/20/a-markdown-powered-article/index.html deleted file mode 100644 index 0f35847a..00000000 --- a/pelican/tests/output/custom_locale/posts/2011/avril/20/a-markdown-powered-article/index.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - A markdown powered article - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - A markdown powered article

    -
    - -
    -

    You're mutually oblivious.

    -

    a root-relative link to unbelievable -a file-relative link to unbelievable

    -
    -
    -

    Comments !

    -
    - - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/posts/2011/février/17/article-1/index.html b/pelican/tests/output/custom_locale/posts/2011/février/17/article-1/index.html deleted file mode 100644 index 05418036..00000000 --- a/pelican/tests/output/custom_locale/posts/2011/février/17/article-1/index.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - Article 1 - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - Article 1

    -
    - -
    -

    Article 1

    - -
    -
    -

    Comments !

    -
    - - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/posts/2011/février/17/article-2/index.html b/pelican/tests/output/custom_locale/posts/2011/février/17/article-2/index.html deleted file mode 100644 index 8cb67749..00000000 --- a/pelican/tests/output/custom_locale/posts/2011/février/17/article-2/index.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - Article 2 - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - Article 2

    -
    - -
    -

    Article 2

    - -
    -
    -

    Comments !

    -
    - - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/posts/2011/février/17/article-3/index.html b/pelican/tests/output/custom_locale/posts/2011/février/17/article-3/index.html deleted file mode 100644 index 62423814..00000000 --- a/pelican/tests/output/custom_locale/posts/2011/février/17/article-3/index.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - Article 3 - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - Article 3

    -
    - -
    -

    Article 3

    - -
    -
    -

    Comments !

    -
    - - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/posts/2012/février/29/second-article/index.html b/pelican/tests/output/custom_locale/posts/2012/février/29/second-article/index.html deleted file mode 100644 index 615a7f30..00000000 --- a/pelican/tests/output/custom_locale/posts/2012/février/29/second-article/index.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - Second article - - - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - Second article

    -
    - -
    -

    This is some article, in english

    - -
    -
    -

    Comments !

    -
    - - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/posts/2012/novembre/30/filename_metadata-example/index.html b/pelican/tests/output/custom_locale/posts/2012/novembre/30/filename_metadata-example/index.html deleted file mode 100644 index 2213d174..00000000 --- a/pelican/tests/output/custom_locale/posts/2012/novembre/30/filename_metadata-example/index.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - FILENAME_METADATA example - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - FILENAME_METADATA example

    -
    - -
    -

    Some cool stuff!

    - -
    -
    -

    Comments !

    -
    - - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/robots.txt b/pelican/tests/output/custom_locale/robots.txt deleted file mode 100644 index 19a6e299..00000000 --- a/pelican/tests/output/custom_locale/robots.txt +++ /dev/null @@ -1,2 +0,0 @@ -User-agent: * -Disallow: /pictures diff --git a/pelican/tests/output/custom_locale/second-article-fr.html b/pelican/tests/output/custom_locale/second-article-fr.html deleted file mode 100644 index 3c21ef75..00000000 --- a/pelican/tests/output/custom_locale/second-article-fr.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - Deuxième article - - - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - Deuxième article

    -
    - -
    -

    Ceci est un article, en français.

    - -
    -
    -

    Comments !

    -
    - - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/tag/bar.html b/pelican/tests/output/custom_locale/tag/bar.html deleted file mode 100644 index aaa5fb0d..00000000 --- a/pelican/tests/output/custom_locale/tag/bar.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - Alexis' log - bar - - - - - - - -Fork me on GitHub - - - - -
    -

    Other articles

    -
    -
      - -
    1. - -
    2. -
      -

      Oh yeah !

      -
      - -
      -
      -

      Why not ?

      -

      After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! -YEAH !

      -alternate text -
      - - read more -

      There are comments.

      -
    3. -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/tag/baz.html b/pelican/tests/output/custom_locale/tag/baz.html deleted file mode 100644 index 9554bdd6..00000000 --- a/pelican/tests/output/custom_locale/tag/baz.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - The baz tag - - - - - - - - -Fork me on GitHub - - -
    -
    -
    -

    - The baz tag

    -
    - -
    -

    This article overrides the listening of the articles under the baz tag.

    - -
    -
    -

    Comments !

    -
    - - -
    - -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/tag/foo.html b/pelican/tests/output/custom_locale/tag/foo.html deleted file mode 100644 index 15523248..00000000 --- a/pelican/tests/output/custom_locale/tag/foo.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - Alexis' log - foo - - - - - - - -Fork me on GitHub - - - - -
    -

    Other articles

    -
    -
      - -
    1. -
    -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/tag/foobar.html b/pelican/tests/output/custom_locale/tag/foobar.html deleted file mode 100644 index 1393a76e..00000000 --- a/pelican/tests/output/custom_locale/tag/foobar.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - Alexis' log - foobar - - - - - - - -Fork me on GitHub - - - - -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/tag/oh.html b/pelican/tests/output/custom_locale/tag/oh.html deleted file mode 100644 index b6fe445f..00000000 --- a/pelican/tests/output/custom_locale/tag/oh.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - Oh Oh Oh - - - - - - - -Fork me on GitHub - - -
    -

    Oh Oh Oh

    - -

    This page overrides the listening of the articles under the oh tag.

    - -
    -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/tag/yeah.html b/pelican/tests/output/custom_locale/tag/yeah.html deleted file mode 100644 index 3953f1b7..00000000 --- a/pelican/tests/output/custom_locale/tag/yeah.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - Alexis' log - yeah - - - - - - - -Fork me on GitHub - - - - -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/tags.html b/pelican/tests/output/custom_locale/tags.html deleted file mode 100644 index cf932f97..00000000 --- a/pelican/tests/output/custom_locale/tags.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - Alexis' log - Tags - - - - - - - -Fork me on GitHub - - - -
    -

    Tags for Alexis' log

    - -
    - -
    - - -
    - - - - - - \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/theme/css/fonts.css b/pelican/tests/output/custom_locale/theme/css/fonts.css deleted file mode 100644 index 56015076..00000000 --- a/pelican/tests/output/custom_locale/theme/css/fonts.css +++ /dev/null @@ -1,12 +0,0 @@ -@font-face { - font-family: 'Yanone Kaffeesatz'; - font-style: normal; - font-weight: 400; - src: - local('Yanone Kaffeesatz Regular'), - local('YanoneKaffeesatz-Regular'), - /* from https://fonts.gstatic.com/s/yanonekaffeesatz/v8/YDAoLskQQ5MOAgvHUQCcLRTHiN2BPBirwIkMLKUspj4.woff */ - url('../fonts/Yanone_Kaffeesatz_400.woff') format('woff'), - /* from https://fonts.gstatic.com/s/yanonekaffeesatz/v8/YDAoLskQQ5MOAgvHUQCcLfGwxTS8d1Q9KiDNCMKLFUM.woff2 */ - url('../fonts/Yanone_Kaffeesatz_400.woff2') format('woff2'); -} diff --git a/pelican/tests/output/custom_locale/theme/css/main.css b/pelican/tests/output/custom_locale/theme/css/main.css deleted file mode 100644 index aaea9b81..00000000 --- a/pelican/tests/output/custom_locale/theme/css/main.css +++ /dev/null @@ -1,466 +0,0 @@ -/* - Name: Smashing HTML5 - Date: July 2009 - Description: Sample layout for HTML5 and CSS3 goodness. - Version: 1.0 - License: MIT - Licensed by: Smashing Media GmbH - Original author: Enrique Ramírez -*/ - -/* Imports */ -@import url("reset.css"); -@import url("pygment.css"); -@import url("typogrify.css"); -@import url("fonts.css"); - -/***** Global *****/ -/* Body */ -body { - background: #F5F4EF; - color: #000305; - font-size: 87.5%; /* Base font size: 14px */ - font-family: 'Trebuchet MS', Trebuchet, 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; - line-height: 1.429; - margin: 0; - padding: 0; - text-align: left; -} - -/* Headings */ -h1 {font-size: 2em } -h2 {font-size: 1.571em} /* 22px */ -h3 {font-size: 1.429em} /* 20px */ -h4 {font-size: 1.286em} /* 18px */ -h5 {font-size: 1.143em} /* 16px */ -h6 {font-size: 1em} /* 14px */ - -h1, h2, h3, h4, h5, h6 { - font-weight: 400; - line-height: 1.1; - margin-bottom: .8em; - font-family: 'Yanone Kaffeesatz', arial, serif; -} - -h3, h4, h5, h6 { margin-top: .8em; } - -hr { border: 2px solid #EEEEEE; } - -/* Anchors */ -a {outline: 0;} -a img {border: 0px; text-decoration: none;} -a:link, a:visited { - color: #C74350; - padding: 0 1px; - text-decoration: underline; -} -a:hover, a:active { - background-color: #C74350; - color: #fff; - text-decoration: none; - text-shadow: 1px 1px 1px #333; -} - -h1 a:hover { - background-color: inherit -} - -/* Paragraphs */ -div.line-block, -p { margin-top: 1em; - margin-bottom: 1em;} - -strong, b {font-weight: bold;} -em, i {font-style: italic;} - -/* Lists */ -ul { - list-style: outside disc; - margin: 0em 0 0 1.5em; -} - -ol { - list-style: outside decimal; - margin: 0em 0 0 1.5em; -} - -li { margin-top: 0.5em; - margin-bottom: 1em; } - -.post-info { - float:right; - margin:10px; - padding:5px; -} - -.post-info p{ - margin-top: 1px; - margin-bottom: 1px; -} - -.readmore { float: right } - -dl {margin: 0 0 1.5em 0;} -dt {font-weight: bold;} -dd {margin-left: 1.5em;} - -pre{background-color: rgb(238, 238, 238); padding: 10px; margin: 10px; overflow: auto;} - -/* Quotes */ -blockquote { - margin: 20px; - font-style: italic; -} -cite {} - -q {} - -div.note { - float: right; - margin: 5px; - font-size: 85%; - max-width: 300px; -} - -/* Tables */ -table {margin: .5em auto 1.5em auto; width: 98%;} - - /* Thead */ - thead th {padding: .5em .4em; text-align: left;} - thead td {} - - /* Tbody */ - tbody td {padding: .5em .4em;} - tbody th {} - - tbody .alt td {} - tbody .alt th {} - - /* Tfoot */ - tfoot th {} - tfoot td {} - -/* HTML5 tags */ -header, section, footer, -aside, nav, article, figure { - display: block; -} - -/***** Layout *****/ -.body {clear: both; margin: 0 auto; width: 800px;} -img.right, figure.right, div.figure.align-right { - float: right; - margin: 0 0 2em 2em; -} -img.left, figure.left, div.figure.align-left { - float: left; - margin: 0 2em 2em 0; -} - -/* .rst support */ -div.figure img, figure img { /* to fill figure exactly */ - width: 100%; -} -div.figure p.caption, figure p.caption { /* margin provided by figure */ - margin-top: 0; - margin-bottom: 0; -} - -/* - Header -*****************/ -#banner { - margin: 0 auto; - padding: 2.5em 0 0 0; -} - - /* Banner */ - #banner h1 {font-size: 3.571em; line-height: 0;} - #banner h1 a:link, #banner h1 a:visited { - color: #000305; - display: block; - font-weight: bold; - margin: 0 0 .6em .2em; - text-decoration: none; - } - #banner h1 a:hover, #banner h1 a:active { - background: none; - color: #C74350; - text-shadow: none; - } - - #banner h1 strong {font-size: 0.36em; font-weight: normal;} - - /* Main Nav */ - #banner nav { - background: #000305; - font-size: 1.143em; - height: 40px; - line-height: 30px; - margin: 0 auto 2em auto; - padding: 0; - text-align: center; - width: 800px; - - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - } - - #banner nav ul {list-style: none; margin: 0 auto; width: 800px;} - #banner nav li {float: left; display: inline; margin: 0;} - - #banner nav a:link, #banner nav a:visited { - color: #fff; - display: inline-block; - height: 30px; - padding: 5px 1.5em; - text-decoration: none; - } - #banner nav a:hover, #banner nav a:active, - #banner nav .active a:link, #banner nav .active a:visited { - background: #C74451; - color: #fff; - text-shadow: none !important; - } - - #banner nav li:first-child a { - border-top-left-radius: 5px; - -moz-border-radius-topleft: 5px; - -webkit-border-top-left-radius: 5px; - - border-bottom-left-radius: 5px; - -moz-border-radius-bottomleft: 5px; - -webkit-border-bottom-left-radius: 5px; - } - -/* - Featured -*****************/ -#featured { - background: #fff; - margin-bottom: 2em; - overflow: hidden; - padding: 20px; - width: 760px; - - border-radius: 10px; - -moz-border-radius: 10px; - -webkit-border-radius: 10px; -} - -#featured figure { - border: 2px solid #eee; - float: right; - margin: 0.786em 2em 0 5em; - width: 248px; -} -#featured figure img {display: block; float: right;} - -#featured h2 {color: #C74451; font-size: 1.714em; margin-bottom: 0.333em;} -#featured h3 {font-size: 1.429em; margin-bottom: .5em;} - -#featured h3 a:link, #featured h3 a:visited {color: #000305; text-decoration: none;} -#featured h3 a:hover, #featured h3 a:active {color: #fff;} - -/* - Body -*****************/ -#content { - background: #fff; - margin-bottom: 2em; - overflow: hidden; - padding: 20px 20px; - width: 760px; - - border-radius: 10px; - -moz-border-radius: 10px; - -webkit-border-radius: 10px; -} - -/* - Extras -*****************/ -#extras {margin: 0 auto 3em auto; overflow: hidden;} - -#extras ul {list-style: none; margin: 0;} -#extras li {border-bottom: 1px solid #fff;} -#extras h2 { - color: #C74350; - font-size: 1.429em; - margin-bottom: .25em; - padding: 0 3px; -} - -#extras a:link, #extras a:visited { - color: #444; - display: block; - border-bottom: 1px solid #F4E3E3; - text-decoration: none; - padding: .3em .25em; -} - -#extras a:hover, #extras a:active {color: #fff;} - - /* Blogroll */ - #extras .blogroll { - float: left; - width: 615px; - } - - #extras .blogroll li {float: left; margin: 0 20px 0 0; width: 185px;} - - /* Social */ - #extras .social { - float: right; - width: 175px; - } - - #extras div[class='social'] a { - background-repeat: no-repeat; - background-position: 3px 6px; - padding-left: 25px; - } - - /* Icons */ - .social a[href*='about.me'] {background-image: url('../images/icons/aboutme.png');} - .social a[href*='bitbucket.org'] {background-image: url('../images/icons/bitbucket.png');} - .social a[href*='delicious.com'] {background-image: url('../images/icons/delicious.png');} - .social a[href*='facebook.com'] {background-image: url('../images/icons/facebook.png');} - .social a[href*='gitorious.org'] {background-image: url('../images/icons/gitorious.png');} - .social a[href*='github.com'], - .social a[href*='git.io'] { - background-image: url('../images/icons/github.png'); - background-size: 16px 16px; - } - .social a[href*='gittip.com'] {background-image: url('../images/icons/gittip.png');} - .social a[href*='plus.google.com'] {background-image: url('../images/icons/google-plus.png');} - .social a[href*='groups.google.com'] {background-image: url('../images/icons/google-groups.png');} - .social a[href*='news.ycombinator.com'], - .social a[href*='hackernewsers.com'] {background-image: url('../images/icons/hackernews.png');} - .social a[href*='last.fm'], .social a[href*='lastfm.'] {background-image: url('../images/icons/lastfm.png');} - .social a[href*='linkedin.com'] {background-image: url('../images/icons/linkedin.png');} - .social a[href*='reddit.com'] {background-image: url('../images/icons/reddit.png');} - .social a[type$='atom+xml'], .social a[type$='rss+xml'] {background-image: url('../images/icons/rss.png');} - .social a[href*='slideshare.net'] {background-image: url('../images/icons/slideshare.png');} - .social a[href*='speakerdeck.com'] {background-image: url('../images/icons/speakerdeck.png');} - .social a[href*='stackoverflow.com'] {background-image: url('../images/icons/stackoverflow.png');} - .social a[href*='twitter.com'] {background-image: url('../images/icons/twitter.png');} - .social a[href*='vimeo.com'] {background-image: url('../images/icons/vimeo.png');} - .social a[href*='youtube.com'] {background-image: url('../images/icons/youtube.png');} - -/* - About -*****************/ -#about { - background: #fff; - font-style: normal; - margin-bottom: 2em; - overflow: hidden; - padding: 20px; - text-align: left; - width: 760px; - - border-radius: 10px; - -moz-border-radius: 10px; - -webkit-border-radius: 10px; -} - -#about .primary {float: left; width: 165px;} -#about .primary strong {color: #C64350; display: block; font-size: 1.286em;} -#about .photo {float: left; margin: 5px 20px;} - -#about .url:link, #about .url:visited {text-decoration: none;} - -#about .bio {float: right; width: 500px;} - -/* - Footer -*****************/ -#contentinfo {padding-bottom: 2em; text-align: right;} - -/***** Sections *****/ -/* Blog */ -.hentry { - display: block; - clear: both; - border-top: 1px solid #eee; - padding: 1.5em 0; -} -li:first-child .hentry, #content > .hentry {border: 0; margin: 0;} -#content > .hentry {padding: 1em 0;} -.hentry img{display : none ;} -.entry-title {font-size: 3em; margin-bottom: 10px; margin-top: 0;} -.entry-title a:link, .entry-title a:visited {text-decoration: none; color: #333;} -.entry-title a:visited {background-color: #fff;} - -.hentry .post-info * {font-style: normal;} - - /* Content */ - .hentry footer {margin-bottom: 2em;} - .hentry footer address {display: inline;} - #posts-list footer address {display: block;} - - /* Blog Index */ - #posts-list {list-style: none; margin: 0;} - #posts-list .hentry {padding-left: 10px; position: relative;} - - #posts-list footer { - left: 10px; - position: relative; - float: left; - top: 0.5em; - width: 190px; - } - - /* About the Author */ - #about-author { - background: #f9f9f9; - clear: both; - font-style: normal; - margin: 2em 0; - padding: 10px 20px 15px 20px; - - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - } - - #about-author strong { - color: #C64350; - clear: both; - display: block; - font-size: 1.429em; - } - - #about-author .photo {border: 1px solid #ddd; float: left; margin: 5px 1em 0 0;} - - /* Comments */ - #comments-list {list-style: none; margin: 0 1em;} - #comments-list blockquote { - background: #f8f8f8; - clear: both; - font-style: normal; - margin: 0; - padding: 15px 20px; - - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - } - #comments-list footer {color: #888; padding: .5em 1em 0 0; text-align: right;} - - #comments-list li:nth-child(2n) blockquote {background: #F5f5f5;} - - /* Add a Comment */ - #add-comment label {clear: left; float: left; text-align: left; width: 150px;} - #add-comment input[type='text'], - #add-comment input[type='email'], - #add-comment input[type='url'] {float: left; width: 200px;} - - #add-comment textarea {float: left; height: 150px; width: 495px;} - - #add-comment p.req {clear: both; margin: 0 .5em 1em 0; text-align: right;} - - #add-comment input[type='submit'] {float: right; margin: 0 .5em;} - #add-comment * {margin-bottom: .5em;} diff --git a/pelican/tests/output/custom_locale/theme/css/pygment.css b/pelican/tests/output/custom_locale/theme/css/pygment.css deleted file mode 100644 index fdd056f6..00000000 --- a/pelican/tests/output/custom_locale/theme/css/pygment.css +++ /dev/null @@ -1,205 +0,0 @@ -.hll { -background-color:#eee; -} -.c { -color:#408090; -font-style:italic; -} -.err { -border:1px solid #FF0000; -} -.k { -color:#007020; -font-weight:bold; -} -.o { -color:#666666; -} -.cm { -color:#408090; -font-style:italic; -} -.cp { -color:#007020; -} -.c1 { -color:#408090; -font-style:italic; -} -.cs { -background-color:#FFF0F0; -color:#408090; -} -.gd { -color:#A00000; -} -.ge { -font-style:italic; -} -.gr { -color:#FF0000; -} -.gh { -color:#000080; -font-weight:bold; -} -.gi { -color:#00A000; -} -.go { -color:#303030; -} -.gp { -color:#C65D09; -font-weight:bold; -} -.gs { -font-weight:bold; -} -.gu { -color:#800080; -font-weight:bold; -} -.gt { -color:#0040D0; -} -.kc { -color:#007020; -font-weight:bold; -} -.kd { -color:#007020; -font-weight:bold; -} -.kn { -color:#007020; -font-weight:bold; -} -.kp { -color:#007020; -} -.kr { -color:#007020; -font-weight:bold; -} -.kt { -color:#902000; -} -.m { -color:#208050; -} -.s { -color:#4070A0; -} -.na { -color:#4070A0; -} -.nb { -color:#007020; -} -.nc { -color:#0E84B5; -font-weight:bold; -} -.no { -color:#60ADD5; -} -.nd { -color:#555555; -font-weight:bold; -} -.ni { -color:#D55537; -font-weight:bold; -} -.ne { -color:#007020; -} -.nf { -color:#06287E; -} -.nl { -color:#002070; -font-weight:bold; -} -.nn { -color:#0E84B5; -font-weight:bold; -} -.nt { -color:#062873; -font-weight:bold; -} -.nv { -color:#BB60D5; -} -.ow { -color:#007020; -font-weight:bold; -} -.w { -color:#BBBBBB; -} -.mf { -color:#208050; -} -.mh { -color:#208050; -} -.mi { -color:#208050; -} -.mo { -color:#208050; -} -.sb { -color:#4070A0; -} -.sc { -color:#4070A0; -} -.sd { -color:#4070A0; -font-style:italic; -} -.s2 { -color:#4070A0; -} -.se { -color:#4070A0; -font-weight:bold; -} -.sh { -color:#4070A0; -} -.si { -color:#70A0D0; -font-style:italic; -} -.sx { -color:#C65D09; -} -.sr { -color:#235388; -} -.s1 { -color:#4070A0; -} -.ss { -color:#517918; -} -.bp { -color:#007020; -} -.vc { -color:#BB60D5; -} -.vg { -color:#BB60D5; -} -.vi { -color:#BB60D5; -} -.il { -color:#208050; -} diff --git a/pelican/tests/output/custom_locale/theme/css/reset.css b/pelican/tests/output/custom_locale/theme/css/reset.css deleted file mode 100644 index c88e6196..00000000 --- a/pelican/tests/output/custom_locale/theme/css/reset.css +++ /dev/null @@ -1,52 +0,0 @@ -/* - Name: Reset Stylesheet - Description: Resets browser's default CSS - Author: Eric Meyer - Author URI: https://meyerweb.com/eric/tools/css/reset/ -*/ - -/* v1.0 | 20080212 */ -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, font, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td { - background: transparent; - border: 0; - font-size: 100%; - margin: 0; - outline: 0; - padding: 0; - vertical-align: baseline; -} - -body {line-height: 1;} - -ol, ul {list-style: none;} - -blockquote, q {quotes: none;} - -blockquote:before, blockquote:after, -q:before, q:after { - content: ''; - content: none; -} - -/* remember to define focus styles! */ -:focus { - outline: 0; -} - -/* remember to highlight inserts somehow! */ -ins {text-decoration: none;} -del {text-decoration: line-through;} - -/* tables still need 'cellspacing="0"' in the markup */ -table { - border-collapse: collapse; - border-spacing: 0; -} \ No newline at end of file diff --git a/pelican/tests/output/custom_locale/theme/css/typogrify.css b/pelican/tests/output/custom_locale/theme/css/typogrify.css deleted file mode 100644 index 3bae4976..00000000 --- a/pelican/tests/output/custom_locale/theme/css/typogrify.css +++ /dev/null @@ -1,3 +0,0 @@ -.caps {font-size:.92em;} -.amp {color:#666; font-size:1.05em;font-family:"Warnock Pro", "Goudy Old Style","Palatino","Book Antiqua",serif; font-style:italic;} -.dquo {margin-left:-.38em;} diff --git a/pelican/tests/output/custom_locale/theme/css/wide.css b/pelican/tests/output/custom_locale/theme/css/wide.css deleted file mode 100644 index 88fd59ce..00000000 --- a/pelican/tests/output/custom_locale/theme/css/wide.css +++ /dev/null @@ -1,48 +0,0 @@ -@import url("main.css"); - -body { - font:1.3em/1.3 "Hoefler Text","Georgia",Georgia,serif,sans-serif; -} - -.post-info{ - display: none; -} - -#banner nav { - display: none; - -moz-border-radius: 0px; - margin-bottom: 20px; - overflow: hidden; - font-size: 1em; - background: #F5F4EF; -} - -#banner nav ul{ - padding-right: 50px; -} - -#banner nav li{ - float: right; - color: #000; -} - -#banner nav li a { - color: #000; -} - -#banner h1 { - margin-bottom: -18px; -} - -#featured, #extras { - padding: 50px; -} - -#featured { - padding-top: 20px; -} - -#extras { - padding-top: 0px; - padding-bottom: 0px; -} diff --git a/pelican/tests/output/custom_locale/theme/fonts/Yanone_Kaffeesatz_400.eot b/pelican/tests/output/custom_locale/theme/fonts/Yanone_Kaffeesatz_400.eot deleted file mode 100644 index b3b90dbc..00000000 Binary files a/pelican/tests/output/custom_locale/theme/fonts/Yanone_Kaffeesatz_400.eot and /dev/null differ diff --git a/pelican/tests/output/custom_locale/theme/fonts/Yanone_Kaffeesatz_400.svg b/pelican/tests/output/custom_locale/theme/fonts/Yanone_Kaffeesatz_400.svg deleted file mode 100644 index a69669b5..00000000 --- a/pelican/tests/output/custom_locale/theme/fonts/Yanone_Kaffeesatz_400.svg +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pelican/tests/output/custom_locale/theme/fonts/Yanone_Kaffeesatz_400.ttf b/pelican/tests/output/custom_locale/theme/fonts/Yanone_Kaffeesatz_400.ttf deleted file mode 100644 index 6f4feb02..00000000 Binary files a/pelican/tests/output/custom_locale/theme/fonts/Yanone_Kaffeesatz_400.ttf and /dev/null differ diff --git a/pelican/tests/output/custom_locale/theme/fonts/Yanone_Kaffeesatz_400.woff b/pelican/tests/output/custom_locale/theme/fonts/Yanone_Kaffeesatz_400.woff deleted file mode 100644 index ddccf765..00000000 Binary files a/pelican/tests/output/custom_locale/theme/fonts/Yanone_Kaffeesatz_400.woff and /dev/null differ diff --git a/pelican/tests/output/custom_locale/theme/fonts/Yanone_Kaffeesatz_400.woff2 b/pelican/tests/output/custom_locale/theme/fonts/Yanone_Kaffeesatz_400.woff2 deleted file mode 100644 index 7b18f7ea..00000000 Binary files a/pelican/tests/output/custom_locale/theme/fonts/Yanone_Kaffeesatz_400.woff2 and /dev/null differ diff --git a/pelican/tests/output/custom_locale/theme/fonts/font.css b/pelican/tests/output/custom_locale/theme/fonts/font.css deleted file mode 100644 index a9eb87e6..00000000 --- a/pelican/tests/output/custom_locale/theme/fonts/font.css +++ /dev/null @@ -1,12 +0,0 @@ -@font-face { - font-family: 'Yanone Kaffeesatz'; - font-style: normal; - font-weight: 400; - src: - local('Yanone Kaffeesatz Regular'), - local('YanoneKaffeesatz-Regular'), - /* from https://fonts.gstatic.com/s/yanonekaffeesatz/v8/YDAoLskQQ5MOAgvHUQCcLRTHiN2BPBirwIkMLKUspj4.woff */ - url('Yanone_Kaffeesatz_400.woff') format('woff'), - /* from https://fonts.gstatic.com/s/yanonekaffeesatz/v8/YDAoLskQQ5MOAgvHUQCcLfGwxTS8d1Q9KiDNCMKLFUM.woff2 */ - url('Yanone_Kaffeesatz_400.woff2') format('woff2'); -} diff --git a/pelican/tests/output/custom_locale/theme/images/icons/aboutme.png b/pelican/tests/output/custom_locale/theme/images/icons/aboutme.png deleted file mode 100644 index 600110f2..00000000 Binary files a/pelican/tests/output/custom_locale/theme/images/icons/aboutme.png and /dev/null differ diff --git a/pelican/tests/output/custom_locale/theme/images/icons/bitbucket.png b/pelican/tests/output/custom_locale/theme/images/icons/bitbucket.png deleted file mode 100644 index 277a7dfb..00000000 Binary files a/pelican/tests/output/custom_locale/theme/images/icons/bitbucket.png and /dev/null differ diff --git a/pelican/tests/output/custom_locale/theme/images/icons/delicious.png b/pelican/tests/output/custom_locale/theme/images/icons/delicious.png deleted file mode 100644 index 34868c5c..00000000 Binary files a/pelican/tests/output/custom_locale/theme/images/icons/delicious.png and /dev/null differ diff --git a/pelican/tests/output/custom_locale/theme/images/icons/facebook.png b/pelican/tests/output/custom_locale/theme/images/icons/facebook.png deleted file mode 100644 index 1d8a4327..00000000 Binary files a/pelican/tests/output/custom_locale/theme/images/icons/facebook.png and /dev/null differ diff --git a/pelican/tests/output/custom_locale/theme/images/icons/github.png b/pelican/tests/output/custom_locale/theme/images/icons/github.png deleted file mode 100644 index 5d9109de..00000000 Binary files a/pelican/tests/output/custom_locale/theme/images/icons/github.png and /dev/null differ diff --git a/pelican/tests/output/custom_locale/theme/images/icons/gitorious.png b/pelican/tests/output/custom_locale/theme/images/icons/gitorious.png deleted file mode 100644 index a6705d0f..00000000 Binary files a/pelican/tests/output/custom_locale/theme/images/icons/gitorious.png and /dev/null differ diff --git a/pelican/tests/output/custom_locale/theme/images/icons/gittip.png b/pelican/tests/output/custom_locale/theme/images/icons/gittip.png deleted file mode 100644 index b9f67aaa..00000000 Binary files a/pelican/tests/output/custom_locale/theme/images/icons/gittip.png and /dev/null differ diff --git a/pelican/tests/output/custom_locale/theme/images/icons/google-groups.png b/pelican/tests/output/custom_locale/theme/images/icons/google-groups.png deleted file mode 100644 index bbd0a0fd..00000000 Binary files a/pelican/tests/output/custom_locale/theme/images/icons/google-groups.png and /dev/null differ diff --git a/pelican/tests/output/custom_locale/theme/images/icons/google-plus.png b/pelican/tests/output/custom_locale/theme/images/icons/google-plus.png deleted file mode 100644 index f8553d45..00000000 Binary files a/pelican/tests/output/custom_locale/theme/images/icons/google-plus.png and /dev/null differ diff --git a/pelican/tests/output/custom_locale/theme/images/icons/hackernews.png b/pelican/tests/output/custom_locale/theme/images/icons/hackernews.png deleted file mode 100644 index 8e05e3ee..00000000 Binary files a/pelican/tests/output/custom_locale/theme/images/icons/hackernews.png and /dev/null differ diff --git a/pelican/tests/output/custom_locale/theme/images/icons/lastfm.png b/pelican/tests/output/custom_locale/theme/images/icons/lastfm.png deleted file mode 100644 index 2eedd2da..00000000 Binary files a/pelican/tests/output/custom_locale/theme/images/icons/lastfm.png and /dev/null differ diff --git a/pelican/tests/output/custom_locale/theme/images/icons/linkedin.png b/pelican/tests/output/custom_locale/theme/images/icons/linkedin.png deleted file mode 100644 index 06a88016..00000000 Binary files a/pelican/tests/output/custom_locale/theme/images/icons/linkedin.png and /dev/null differ diff --git a/pelican/tests/output/custom_locale/theme/images/icons/reddit.png b/pelican/tests/output/custom_locale/theme/images/icons/reddit.png deleted file mode 100644 index d826d3e7..00000000 Binary files a/pelican/tests/output/custom_locale/theme/images/icons/reddit.png and /dev/null differ diff --git a/pelican/tests/output/custom_locale/theme/images/icons/rss.png b/pelican/tests/output/custom_locale/theme/images/icons/rss.png deleted file mode 100644 index 12448f53..00000000 Binary files a/pelican/tests/output/custom_locale/theme/images/icons/rss.png and /dev/null differ diff --git a/pelican/tests/output/custom_locale/theme/images/icons/slideshare.png b/pelican/tests/output/custom_locale/theme/images/icons/slideshare.png deleted file mode 100644 index 9cbe8588..00000000 Binary files a/pelican/tests/output/custom_locale/theme/images/icons/slideshare.png and /dev/null differ diff --git a/pelican/tests/output/custom_locale/theme/images/icons/speakerdeck.png b/pelican/tests/output/custom_locale/theme/images/icons/speakerdeck.png deleted file mode 100644 index 7281ec48..00000000 Binary files a/pelican/tests/output/custom_locale/theme/images/icons/speakerdeck.png and /dev/null differ diff --git a/pelican/tests/output/custom_locale/theme/images/icons/stackoverflow.png b/pelican/tests/output/custom_locale/theme/images/icons/stackoverflow.png deleted file mode 100644 index 3c6862e9..00000000 Binary files a/pelican/tests/output/custom_locale/theme/images/icons/stackoverflow.png and /dev/null differ diff --git a/pelican/tests/output/custom_locale/theme/images/icons/twitter.png b/pelican/tests/output/custom_locale/theme/images/icons/twitter.png deleted file mode 100644 index cef1cef9..00000000 Binary files a/pelican/tests/output/custom_locale/theme/images/icons/twitter.png and /dev/null differ diff --git a/pelican/tests/output/custom_locale/theme/images/icons/vimeo.png b/pelican/tests/output/custom_locale/theme/images/icons/vimeo.png deleted file mode 100644 index 4b9d7212..00000000 Binary files a/pelican/tests/output/custom_locale/theme/images/icons/vimeo.png and /dev/null differ diff --git a/pelican/tests/output/custom_locale/theme/images/icons/youtube.png b/pelican/tests/output/custom_locale/theme/images/icons/youtube.png deleted file mode 100644 index e334e68e..00000000 Binary files a/pelican/tests/output/custom_locale/theme/images/icons/youtube.png and /dev/null differ diff --git a/pelican/tests/parse_error/parse_error.rst b/pelican/tests/parse_error/parse_error.rst deleted file mode 100644 index 7aee68e1..00000000 --- a/pelican/tests/parse_error/parse_error.rst +++ /dev/null @@ -1,4 +0,0 @@ -Page with a parse error -############# - -The underline is too short. diff --git a/pelican/tests/support.py b/pelican/tests/support.py deleted file mode 100644 index 55ddf625..00000000 --- a/pelican/tests/support.py +++ /dev/null @@ -1,238 +0,0 @@ -import locale -import logging -import os -import re -import subprocess -import sys -import unittest -from contextlib import contextmanager -from functools import wraps -from io import StringIO -from logging.handlers import BufferingHandler -from shutil import rmtree -from tempfile import mkdtemp - -from pelican.contents import Article -from pelican.readers import default_metadata -from pelican.settings import DEFAULT_CONFIG - -__all__ = ['get_article', 'unittest', ] - - -@contextmanager -def temporary_folder(): - """creates a temporary folder, return it and delete it afterwards. - - This allows to do something like this in tests: - - >>> with temporary_folder() as d: - # do whatever you want - """ - tempdir = mkdtemp() - try: - yield tempdir - finally: - rmtree(tempdir) - - -def isplit(s, sep=None): - """Behaves like str.split but returns a generator instead of a list. - - >>> list(isplit('\tUse the force\n')) == '\tUse the force\n'.split() - True - >>> list(isplit('\tUse the force\n')) == ['Use', 'the', 'force'] - True - >>> (list(isplit('\tUse the force\n', "e")) - == '\tUse the force\n'.split("e")) - True - >>> list(isplit('Use the force', "e")) == 'Use the force'.split("e") - True - >>> list(isplit('Use the force', "e")) == ['Us', ' th', ' forc', ''] - True - - """ - sep, hardsep = r'\s+' if sep is None else re.escape(sep), sep is not None - exp, pos, length = re.compile(sep), 0, len(s) - while True: - m = exp.search(s, pos) - if not m: - if pos < length or hardsep: - # ^ mimic "split()": ''.split() returns [] - yield s[pos:] - break - start = m.start() - if pos < start or hardsep: - # ^ mimic "split()": includes trailing empty string - yield s[pos:start] - pos = m.end() - - -def mute(returns_output=False): - """Decorate a function that prints to stdout, intercepting the output. - If "returns_output" is True, the function will return a generator - yielding the printed lines instead of the return values. - - The decorator literally hijack sys.stdout during each function - execution, so be careful with what you apply it to. - - >>> def numbers(): - print "42" - print "1984" - ... - >>> numbers() - 42 - 1984 - >>> mute()(numbers)() - >>> list(mute(True)(numbers)()) - ['42', '1984'] - - """ - - def decorator(func): - - @wraps(func) - def wrapper(*args, **kwargs): - - saved_stdout = sys.stdout - sys.stdout = StringIO() - - try: - out = func(*args, **kwargs) - if returns_output: - out = isplit(sys.stdout.getvalue().strip()) - finally: - sys.stdout = saved_stdout - - return out - - return wrapper - - return decorator - - -def get_article(title, content, **extra_metadata): - metadata = default_metadata(settings=DEFAULT_CONFIG) - metadata['title'] = title - if extra_metadata: - metadata.update(extra_metadata) - return Article(content, metadata=metadata) - - -def skipIfNoExecutable(executable): - """Skip test if `executable` is not found - - Tries to run `executable` with subprocess to make sure it's in the path, - and skips the tests if not found (if subprocess raises a `OSError`). - """ - - with open(os.devnull, 'w') as fnull: - try: - res = subprocess.call(executable, stdout=fnull, stderr=fnull) - except OSError: - res = None - - if res is None: - return unittest.skip('{} executable not found'.format(executable)) - - return lambda func: func - - -def module_exists(module_name): - """Test if a module is importable.""" - - try: - __import__(module_name) - except ImportError: - return False - else: - return True - - -def locale_available(locale_): - old_locale = locale.setlocale(locale.LC_TIME) - - try: - locale.setlocale(locale.LC_TIME, str(locale_)) - except locale.Error: - return False - else: - locale.setlocale(locale.LC_TIME, old_locale) - return True - - -def can_symlink(): - res = True - try: - with temporary_folder() as f: - os.symlink( - f, - os.path.join(f, 'symlink') - ) - except OSError: - res = False - return res - - -def get_settings(**kwargs): - """Provide tweaked setting dictionaries for testing - - Set keyword arguments to override specific settings. - """ - settings = DEFAULT_CONFIG.copy() - for key, value in kwargs.items(): - settings[key] = value - return settings - - -def get_context(settings=None, **kwargs): - context = settings.copy() if settings else {} - context['generated_content'] = {} - context['static_links'] = set() - context['static_content'] = {} - context.update(kwargs) - return context - - -class LogCountHandler(BufferingHandler): - """Capturing and counting logged messages.""" - - def __init__(self, capacity=1000): - super().__init__(capacity) - - def count_logs(self, msg=None, level=None): - return len([ - rec - for rec - in self.buffer - if (msg is None or re.match(msg, rec.getMessage())) and - (level is None or rec.levelno == level) - ]) - - def count_formatted_logs(self, msg=None, level=None): - return len([ - rec - for rec - in self.buffer - if (msg is None or re.search(msg, self.format(rec))) and - (level is None or rec.levelno == level) - ]) - - -class LoggedTestCase(unittest.TestCase): - """A test case that captures log messages.""" - - def setUp(self): - super().setUp() - self._logcount_handler = LogCountHandler() - logging.getLogger().addHandler(self._logcount_handler) - - def tearDown(self): - logging.getLogger().removeHandler(self._logcount_handler) - super().tearDown() - - def assertLogCountEqual(self, count=None, msg=None, **kwargs): - actual = self._logcount_handler.count_logs(msg=msg, **kwargs) - self.assertEqual( - actual, count, - msg='expected {} occurrences of {!r}, but found {}'.format( - count, msg, actual)) diff --git a/pelican/tests/test_cache.py b/pelican/tests/test_cache.py deleted file mode 100644 index 564f1d31..00000000 --- a/pelican/tests/test_cache.py +++ /dev/null @@ -1,279 +0,0 @@ -import os -from shutil import rmtree -from tempfile import mkdtemp -from unittest.mock import MagicMock - -from pelican.generators import ArticlesGenerator, PagesGenerator -from pelican.tests.support import get_context, get_settings, unittest - - -CUR_DIR = os.path.dirname(__file__) -CONTENT_DIR = os.path.join(CUR_DIR, 'content') - - -class TestCache(unittest.TestCase): - - def setUp(self): - self.temp_cache = mkdtemp(prefix='pelican_cache.') - - def tearDown(self): - rmtree(self.temp_cache) - - def _get_cache_enabled_settings(self): - settings = get_settings() - settings['CACHE_CONTENT'] = True - settings['LOAD_CONTENT_CACHE'] = True - settings['CACHE_PATH'] = self.temp_cache - return settings - - def test_generator_caching(self): - """Test that cached and uncached content is same in generator level""" - settings = self._get_cache_enabled_settings() - settings['CONTENT_CACHING_LAYER'] = 'generator' - settings['PAGE_PATHS'] = ['TestPages'] - settings['DEFAULT_DATE'] = (1970, 1, 1) - settings['READERS'] = {'asc': None} - context = get_context(settings) - - def sorted_titles(items): - return sorted(item.title for item in items) - - # Articles - generator = ArticlesGenerator( - context=context.copy(), settings=settings, - path=CONTENT_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - uncached_articles = sorted_titles(generator.articles) - uncached_drafts = sorted_titles(generator.drafts) - - generator = ArticlesGenerator( - context=context.copy(), settings=settings, - path=CONTENT_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - cached_articles = sorted_titles(generator.articles) - cached_drafts = sorted_titles(generator.drafts) - - self.assertEqual(uncached_articles, cached_articles) - self.assertEqual(uncached_drafts, cached_drafts) - - # Pages - generator = PagesGenerator( - context=context.copy(), settings=settings, - path=CUR_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - uncached_pages = sorted_titles(generator.pages) - uncached_hidden_pages = sorted_titles(generator.hidden_pages) - uncached_draft_pages = sorted_titles(generator.draft_pages) - - generator = PagesGenerator( - context=context.copy(), settings=settings, - path=CUR_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - cached_pages = sorted_titles(generator.pages) - cached_hidden_pages = sorted_titles(generator.hidden_pages) - cached_draft_pages = sorted_titles(generator.draft_pages) - - self.assertEqual(uncached_pages, cached_pages) - self.assertEqual(uncached_hidden_pages, cached_hidden_pages) - self.assertEqual(uncached_draft_pages, cached_draft_pages) - - def test_reader_caching(self): - """Test that cached and uncached content is same in reader level""" - settings = self._get_cache_enabled_settings() - settings['CONTENT_CACHING_LAYER'] = 'reader' - settings['PAGE_PATHS'] = ['TestPages'] - settings['DEFAULT_DATE'] = (1970, 1, 1) - settings['READERS'] = {'asc': None} - context = get_context(settings) - - def sorted_titles(items): - return sorted(item.title for item in items) - - # Articles - generator = ArticlesGenerator( - context=context.copy(), settings=settings, - path=CONTENT_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - uncached_articles = sorted_titles(generator.articles) - uncached_drafts = sorted_titles(generator.drafts) - - generator = ArticlesGenerator( - context=context.copy(), settings=settings, - path=CONTENT_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - cached_articles = sorted_titles(generator.articles) - cached_drafts = sorted_titles(generator.drafts) - - self.assertEqual(uncached_articles, cached_articles) - self.assertEqual(uncached_drafts, cached_drafts) - - # Pages - generator = PagesGenerator( - context=context.copy(), settings=settings, - path=CUR_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - uncached_pages = sorted_titles(generator.pages) - uncached_hidden_pages = sorted_titles(generator.hidden_pages) - - generator = PagesGenerator( - context=context.copy(), settings=settings, - path=CUR_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - cached_pages = sorted_titles(generator.pages) - cached_hidden_pages = sorted_titles(generator.hidden_pages) - - self.assertEqual(uncached_pages, cached_pages) - self.assertEqual(uncached_hidden_pages, cached_hidden_pages) - - def test_article_object_caching(self): - """Test Article objects caching at the generator level""" - settings = self._get_cache_enabled_settings() - settings['CONTENT_CACHING_LAYER'] = 'generator' - settings['DEFAULT_DATE'] = (1970, 1, 1) - settings['READERS'] = {'asc': None} - context = get_context(settings) - - generator = ArticlesGenerator( - context=context.copy(), settings=settings, - path=CONTENT_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - self.assertTrue(hasattr(generator, '_cache')) - - generator = ArticlesGenerator( - context=context.copy(), settings=settings, - path=CONTENT_DIR, theme=settings['THEME'], output_path=None) - generator.readers.read_file = MagicMock() - generator.generate_context() - """ - 6 files don't get cached because they were not valid - - article_with_attributes_containing_double_quotes.html - - article_with_comments.html - - article_with_null_attributes.html - - 2012-11-30_md_w_filename_meta#foo-bar.md - - empty.md - - empty_with_bom.md - """ - self.assertEqual(generator.readers.read_file.call_count, 6) - - def test_article_reader_content_caching(self): - """Test raw article content caching at the reader level""" - settings = self._get_cache_enabled_settings() - settings['READERS'] = {'asc': None} - context = get_context(settings) - - generator = ArticlesGenerator( - context=context.copy(), settings=settings, - path=CONTENT_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - self.assertTrue(hasattr(generator.readers, '_cache')) - - generator = ArticlesGenerator( - context=context.copy(), settings=settings, - path=CONTENT_DIR, theme=settings['THEME'], output_path=None) - readers = generator.readers.readers - for reader in readers.values(): - reader.read = MagicMock() - generator.generate_context() - for reader in readers.values(): - self.assertEqual(reader.read.call_count, 0) - - def test_article_ignore_cache(self): - """Test that all the articles are read again when not loading cache - - used in --ignore-cache or autoreload mode""" - settings = self._get_cache_enabled_settings() - settings['READERS'] = {'asc': None} - context = get_context(settings) - - generator = ArticlesGenerator( - context=context.copy(), settings=settings, - path=CONTENT_DIR, theme=settings['THEME'], output_path=None) - generator.readers.read_file = MagicMock() - generator.generate_context() - self.assertTrue(hasattr(generator, '_cache_open')) - orig_call_count = generator.readers.read_file.call_count - - settings['LOAD_CONTENT_CACHE'] = False - generator = ArticlesGenerator( - context=context.copy(), settings=settings, - path=CONTENT_DIR, theme=settings['THEME'], output_path=None) - generator.readers.read_file = MagicMock() - generator.generate_context() - self.assertEqual( - generator.readers.read_file.call_count, - orig_call_count) - - def test_page_object_caching(self): - """Test Page objects caching at the generator level""" - settings = self._get_cache_enabled_settings() - settings['CONTENT_CACHING_LAYER'] = 'generator' - settings['PAGE_PATHS'] = ['TestPages'] - settings['READERS'] = {'asc': None} - context = get_context(settings) - - generator = PagesGenerator( - context=context.copy(), settings=settings, - path=CUR_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - self.assertTrue(hasattr(generator, '_cache')) - - generator = PagesGenerator( - context=context.copy(), settings=settings, - path=CUR_DIR, theme=settings['THEME'], output_path=None) - generator.readers.read_file = MagicMock() - generator.generate_context() - """ - 1 File doesn't get cached because it was not valid - - bad_page.rst - """ - self.assertEqual(generator.readers.read_file.call_count, 1) - - def test_page_reader_content_caching(self): - """Test raw page content caching at the reader level""" - settings = self._get_cache_enabled_settings() - settings['PAGE_PATHS'] = ['TestPages'] - settings['READERS'] = {'asc': None} - context = get_context(settings) - - generator = PagesGenerator( - context=context.copy(), settings=settings, - path=CUR_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - self.assertTrue(hasattr(generator.readers, '_cache')) - - generator = PagesGenerator( - context=context.copy(), settings=settings, - path=CUR_DIR, theme=settings['THEME'], output_path=None) - readers = generator.readers.readers - for reader in readers.values(): - reader.read = MagicMock() - generator.generate_context() - for reader in readers.values(): - self.assertEqual(reader.read.call_count, 0) - - def test_page_ignore_cache(self): - """Test that all the pages are read again when not loading cache - - used in --ignore_cache or autoreload mode""" - settings = self._get_cache_enabled_settings() - settings['PAGE_PATHS'] = ['TestPages'] - settings['READERS'] = {'asc': None} - context = get_context(settings) - - generator = PagesGenerator( - context=context.copy(), settings=settings, - path=CUR_DIR, theme=settings['THEME'], output_path=None) - generator.readers.read_file = MagicMock() - generator.generate_context() - self.assertTrue(hasattr(generator, '_cache_open')) - orig_call_count = generator.readers.read_file.call_count - - settings['LOAD_CONTENT_CACHE'] = False - generator = PagesGenerator( - context=context.copy(), settings=settings, - path=CUR_DIR, theme=settings['THEME'], output_path=None) - generator.readers.read_file = MagicMock() - generator.generate_context() - self.assertEqual( - generator.readers.read_file.call_count, - orig_call_count) diff --git a/pelican/tests/test_contents.py b/pelican/tests/test_contents.py deleted file mode 100644 index 32012d4f..00000000 --- a/pelican/tests/test_contents.py +++ /dev/null @@ -1,1038 +0,0 @@ -import datetime -import locale -import logging -import os.path -from posixpath import join as posix_join -from sys import platform - -from jinja2.utils import generate_lorem_ipsum - -from pelican.contents import Article, Author, Category, Page, Static -from pelican.plugins.signals import content_object_init -from pelican.settings import DEFAULT_CONFIG -from pelican.tests.support import (LoggedTestCase, get_context, get_settings, - unittest) -from pelican.utils import (path_to_url, posixize_path, truncate_html_words) - - -# generate one paragraph, enclosed with

    -TEST_CONTENT = str(generate_lorem_ipsum(n=1)) -TEST_SUMMARY = generate_lorem_ipsum(n=1, html=False) - - -class TestBase(LoggedTestCase): - - def setUp(self): - super().setUp() - self.old_locale = locale.setlocale(locale.LC_ALL) - locale.setlocale(locale.LC_ALL, 'C') - self.page_kwargs = { - 'content': TEST_CONTENT, - 'context': { - 'localsiteurl': '', - 'generated_content': {}, - 'static_content': {}, - 'static_links': set() - }, - 'metadata': { - 'summary': TEST_SUMMARY, - 'title': 'foo bar', - 'author': Author('Blogger', DEFAULT_CONFIG), - }, - 'source_path': '/path/to/file/foo.ext' - } - self._disable_limit_filter() - - def tearDown(self): - locale.setlocale(locale.LC_ALL, self.old_locale) - self._enable_limit_filter() - - def _disable_limit_filter(self): - from pelican.contents import logger - logger.disable_filter() - - def _enable_limit_filter(self): - from pelican.contents import logger - logger.enable_filter() - - def _copy_page_kwargs(self): - # make a deep copy of page_kwargs - page_kwargs = {key: self.page_kwargs[key] for key in self.page_kwargs} - for key in page_kwargs: - if not isinstance(page_kwargs[key], dict): - break - page_kwargs[key] = { - subkey: page_kwargs[key][subkey] for subkey in page_kwargs[key] - } - - return page_kwargs - - -class TestPage(TestBase): - def test_use_args(self): - # Creating a page with arguments passed to the constructor should use - # them to initialise object's attributes. - metadata = {'foo': 'bar', 'foobar': 'baz', 'title': 'foobar', } - page = Page(TEST_CONTENT, metadata=metadata, - context={'localsiteurl': ''}) - for key, value in metadata.items(): - self.assertTrue(hasattr(page, key)) - self.assertEqual(value, getattr(page, key)) - self.assertEqual(page.content, TEST_CONTENT) - - def test_mandatory_properties(self): - # If the title is not set, must throw an exception. - page = Page('content') - self.assertFalse(page._has_valid_mandatory_properties()) - self.assertLogCountEqual( - count=1, - msg="Skipping .*: could not find information about 'title'", - level=logging.ERROR) - page = Page('content', metadata={'title': 'foobar'}) - self.assertTrue(page._has_valid_mandatory_properties()) - - def test_summary_from_metadata(self): - # If a :summary: metadata is given, it should be used - page = Page(**self.page_kwargs) - self.assertEqual(page.summary, TEST_SUMMARY) - - def test_summary_max_length(self): - # If a :SUMMARY_MAX_LENGTH: is set, and there is no other summary, - # generated summary should not exceed the given length. - page_kwargs = self._copy_page_kwargs() - settings = get_settings() - page_kwargs['settings'] = settings - del page_kwargs['metadata']['summary'] - settings['SUMMARY_MAX_LENGTH'] = None - page = Page(**page_kwargs) - self.assertEqual(page.summary, TEST_CONTENT) - settings['SUMMARY_MAX_LENGTH'] = 10 - page = Page(**page_kwargs) - self.assertEqual(page.summary, truncate_html_words(TEST_CONTENT, 10)) - settings['SUMMARY_MAX_LENGTH'] = 0 - page = Page(**page_kwargs) - self.assertEqual(page.summary, '') - - def test_summary_end_suffix(self): - # If a :SUMMARY_END_SUFFIX: is set, and there is no other summary, - # generated summary should contain the specified marker at the end. - page_kwargs = self._copy_page_kwargs() - settings = get_settings() - page_kwargs['settings'] = settings - del page_kwargs['metadata']['summary'] - settings['SUMMARY_END_SUFFIX'] = 'test_marker' - settings['SUMMARY_MAX_LENGTH'] = 10 - page = Page(**page_kwargs) - self.assertEqual(page.summary, truncate_html_words(TEST_CONTENT, 10, - 'test_marker')) - self.assertIn('test_marker', page.summary) - - def test_summary_get_summary_warning(self): - """calling ._get_summary() should issue a warning""" - page_kwargs = self._copy_page_kwargs() - page = Page(**page_kwargs) - self.assertEqual(page.summary, TEST_SUMMARY) - self.assertEqual(page._get_summary(), TEST_SUMMARY) - self.assertLogCountEqual( - count=1, - msg=r"_get_summary\(\) has been deprecated since 3\.6\.4\. " - "Use the summary decorator instead", - level=logging.WARNING) - - def test_slug(self): - page_kwargs = self._copy_page_kwargs() - settings = get_settings() - page_kwargs['settings'] = settings - settings['SLUGIFY_SOURCE'] = "title" - page = Page(**page_kwargs) - self.assertEqual(page.slug, 'foo-bar') - settings['SLUGIFY_SOURCE'] = "basename" - page = Page(**page_kwargs) - self.assertEqual(page.slug, 'foo') - - # test slug from title with unicode and case - - inputs = ( - # (title, expected, preserve_case, use_unicode) - ('指導書', 'zhi-dao-shu', False, False), - ('指導書', 'Zhi-Dao-Shu', True, False), - ('指導書', '指導書', False, True), - ('指導書', '指導書', True, True), - ('Çığ', 'cig', False, False), - ('Çığ', 'Cig', True, False), - ('Çığ', 'çığ', False, True), - ('Çığ', 'Çığ', True, True), - ) - - settings = get_settings() - page_kwargs = self._copy_page_kwargs() - page_kwargs['settings'] = settings - - for title, expected, preserve_case, use_unicode in inputs: - settings['SLUGIFY_PRESERVE_CASE'] = preserve_case - settings['SLUGIFY_USE_UNICODE'] = use_unicode - page_kwargs['metadata']['title'] = title - page = Page(**page_kwargs) - self.assertEqual(page.slug, expected, - (title, preserve_case, use_unicode)) - - def test_defaultlang(self): - # If no lang is given, default to the default one. - page = Page(**self.page_kwargs) - self.assertEqual(page.lang, DEFAULT_CONFIG['DEFAULT_LANG']) - - # it is possible to specify the lang in the metadata infos - self.page_kwargs['metadata'].update({'lang': 'fr', }) - page = Page(**self.page_kwargs) - self.assertEqual(page.lang, 'fr') - - def test_save_as(self): - # If a lang is not the default lang, save_as should be set - # accordingly. - - # if a title is defined, save_as should be set - page = Page(**self.page_kwargs) - self.assertEqual(page.save_as, "pages/foo-bar.html") - - # if a language is defined, save_as should include it accordingly - self.page_kwargs['metadata'].update({'lang': 'fr', }) - page = Page(**self.page_kwargs) - self.assertEqual(page.save_as, "pages/foo-bar-fr.html") - - def test_relative_source_path(self): - # 'relative_source_path' should be the relative path - # from 'PATH' to 'source_path' - page_kwargs = self._copy_page_kwargs() - - # If 'source_path' is None, 'relative_source_path' should - # also return None - page_kwargs['source_path'] = None - page = Page(**page_kwargs) - self.assertIsNone(page.relative_source_path) - - page_kwargs = self._copy_page_kwargs() - settings = get_settings() - full_path = page_kwargs['source_path'] - - settings['PATH'] = os.path.dirname(full_path) - page_kwargs['settings'] = settings - page = Page(**page_kwargs) - - # if 'source_path' is set, 'relative_source_path' should - # return the relative path from 'PATH' to 'source_path' - self.assertEqual( - page.relative_source_path, - os.path.relpath( - full_path, - os.path.dirname(full_path) - )) - - def test_metadata_url_format(self): - # Arbitrary metadata should be passed through url_format() - page = Page(**self.page_kwargs) - self.assertIn('summary', page.url_format.keys()) - page.metadata['directory'] = 'test-dir' - page.settings = get_settings(PAGE_SAVE_AS='{directory}/{slug}') - self.assertEqual(page.save_as, 'test-dir/foo-bar') - - def test_datetime(self): - # If DATETIME is set to a tuple, it should be used to override LOCALE - dt = datetime.datetime(2015, 9, 13) - - page_kwargs = self._copy_page_kwargs() - - # set its date to dt - page_kwargs['metadata']['date'] = dt - page = Page(**page_kwargs) - - # page.locale_date is a unicode string in both python2 and python3 - dt_date = dt.strftime(DEFAULT_CONFIG['DEFAULT_DATE_FORMAT']) - - self.assertEqual(page.locale_date, dt_date) - page_kwargs['settings'] = get_settings() - - # I doubt this can work on all platforms ... - if platform == "win32": - locale = 'jpn' - else: - locale = 'ja_JP.utf8' - page_kwargs['settings']['DATE_FORMATS'] = {'jp': (locale, - '%Y-%m-%d(%a)')} - page_kwargs['metadata']['lang'] = 'jp' - - import locale as locale_module - try: - page = Page(**page_kwargs) - self.assertEqual(page.locale_date, '2015-09-13(\u65e5)') - except locale_module.Error: - # The constructor of ``Page`` will try to set the locale to - # ``ja_JP.utf8``. But this attempt will failed when there is no - # such locale in the system. You can see which locales there are - # in your system with ``locale -a`` command. - # - # Until we find some other method to test this functionality, we - # will simply skip this test. - unittest.skip("There is no locale %s in this system." % locale) - - def test_template(self): - # Pages default to page, metadata overwrites - default_page = Page(**self.page_kwargs) - self.assertEqual('page', default_page.template) - page_kwargs = self._copy_page_kwargs() - page_kwargs['metadata']['template'] = 'custom' - custom_page = Page(**page_kwargs) - self.assertEqual('custom', custom_page.template) - - def test_signal(self): - def receiver_test_function(sender): - receiver_test_function.has_been_called = True - pass - receiver_test_function.has_been_called = False - - content_object_init.connect(receiver_test_function) - self.assertIn( - receiver_test_function, - content_object_init.receivers_for(Page)) - - self.assertFalse(receiver_test_function.has_been_called) - Page(**self.page_kwargs) - self.assertTrue(receiver_test_function.has_been_called) - - def test_get_content(self): - # Test that the content is updated with the relative links to - # filenames, tags and categories. - settings = get_settings() - args = self.page_kwargs.copy() - args['settings'] = settings - - # Tag - args['content'] = ('A simple test, with a ' - 'link') - page = Page(**args) - content = page.get_content('http://notmyidea.org') - self.assertEqual( - content, - ('A simple test, with a ' - 'link')) - - # Category - args['content'] = ('A simple test, with a ' - 'link') - page = Page(**args) - content = page.get_content('http://notmyidea.org') - self.assertEqual( - content, - ('A simple test, with a ' - 'link')) - - def test_intrasite_link(self): - cls_name = '_DummyArticle' - article = type(cls_name, (object,), {'url': 'article.html'}) - - args = self.page_kwargs.copy() - args['settings'] = get_settings() - args['source_path'] = 'content' - args['context']['generated_content'] = {'article.rst': article} - - # Classic intrasite link via filename - args['content'] = ( - 'A simple test, with a ' - 'link' - ) - content = Page(**args).get_content('http://notmyidea.org') - self.assertEqual( - content, - 'A simple test, with a ' - 'link' - ) - - # fragment - args['content'] = ( - 'A simple test, with a ' - 'link' - ) - content = Page(**args).get_content('http://notmyidea.org') - self.assertEqual( - content, - 'A simple test, with a ' - 'link' - ) - - # query - args['content'] = ( - 'A simple test, with a ' - 'link' - ) - content = Page(**args).get_content('http://notmyidea.org') - self.assertEqual( - content, - 'A simple test, with a ' - 'link' - ) - - # combination - args['content'] = ( - 'A simple test, with a ' - 'link' - ) - content = Page(**args).get_content('http://notmyidea.org') - self.assertEqual( - content, - 'A simple test, with a ' - 'link' - ) - - # also test for summary in metadata - parsed = ( - 'A simple summary test, with a ' - 'link' - ) - linked = ( - 'A simple summary test, with a ' - 'link' - ) - args['settings']['FORMATTED_FIELDS'] = ['summary', 'custom'] - args['metadata']['summary'] = parsed - args['metadata']['custom'] = parsed - args['context']['localsiteurl'] = 'http://notmyidea.org' - p = Page(**args) - # This is called implicitly from all generators and Pelican.run() once - # all files are processed. Here we process just one page so it needs - # to be called explicitly. - p.refresh_metadata_intersite_links() - self.assertEqual(p.summary, linked) - self.assertEqual(p.custom, linked) - - def test_intrasite_link_more(self): - cls_name = '_DummyAsset' - - args = self.page_kwargs.copy() - args['settings'] = get_settings() - args['source_path'] = 'content' - args['context']['static_content'] = { - 'images/poster.jpg': - type(cls_name, (object,), {'url': 'images/poster.jpg'}), - 'assets/video.mp4': - type(cls_name, (object,), {'url': 'assets/video.mp4'}), - 'images/graph.svg': - type(cls_name, (object,), {'url': 'images/graph.svg'}), - } - args['context']['generated_content'] = { - 'reference.rst': - type(cls_name, (object,), {'url': 'reference.html'}), - } - - # video.poster - args['content'] = ( - 'There is a video with poster ' - '' - ) - content = Page(**args).get_content('http://notmyidea.org') - self.assertEqual( - content, - 'There is a video with poster ' - '' - ) - - # object.data - args['content'] = ( - 'There is a svg object ' - '' - '' - ) - content = Page(**args).get_content('http://notmyidea.org') - self.assertEqual( - content, - 'There is a svg object ' - '' - '' - ) - - # blockquote.cite - args['content'] = ( - 'There is a blockquote with cite attribute ' - '

    blah blah
    ' - ) - content = Page(**args).get_content('http://notmyidea.org') - self.assertEqual( - content, - 'There is a blockquote with cite attribute ' - '
    ' - 'blah blah' - '
    ' - ) - - def test_intrasite_link_absolute(self): - """Test that absolute URLs are merged properly.""" - - args = self.page_kwargs.copy() - args['settings'] = get_settings( - STATIC_URL='http://static.cool.site/{path}', - ARTICLE_URL='http://blog.cool.site/{slug}.html') - args['source_path'] = 'content' - args['context']['static_content'] = { - 'images/poster.jpg': - Static('', settings=args['settings'], - source_path='images/poster.jpg'), - } - args['context']['generated_content'] = { - 'article.rst': - Article('', settings=args['settings'], metadata={ - 'slug': 'article', 'title': 'Article'}) - } - - # Article link will go to blog - args['content'] = ( - 'Article' - ) - content = Page(**args).get_content('http://cool.site') - self.assertEqual( - content, - 'Article' - ) - - # Page link will go to the main site - args['content'] = ( - 'Index' - ) - content = Page(**args).get_content('http://cool.site') - self.assertEqual( - content, - 'Index' - ) - - # Image link will go to static - args['content'] = ( - '' - ) - content = Page(**args).get_content('http://cool.site') - self.assertEqual( - content, - '' - ) - - def test_intrasite_link_escape(self): - article = type( - '_DummyArticle', (object,), {'url': 'article-spaces.html'}) - asset = type( - '_DummyAsset', (object,), {'url': 'name@example.com'}) - - args = self.page_kwargs.copy() - args['settings'] = get_settings() - args['source_path'] = 'content' - args['context']['generated_content'] = {'article spaces.rst': article} - args['context']['static_content'] = {'name@example.com': asset} - - expected_output = ( - 'A simple test with a ' - 'link ' - 'file' - ) - - # not escaped - args['content'] = ( - 'A simple test with a ' - 'link ' - 'file' - ) - content = Page(**args).get_content('http://notmyidea.org') - self.assertEqual(content, expected_output) - - # html escaped - args['content'] = ( - 'A simple test with a ' - 'link ' - 'file' - ) - content = Page(**args).get_content('http://notmyidea.org') - self.assertEqual(content, expected_output) - - # url escaped - args['content'] = ( - 'A simple test with a ' - 'link ' - 'file' - ) - content = Page(**args).get_content('http://notmyidea.org') - self.assertEqual(content, expected_output) - - # html and url escaped - args['content'] = ( - 'A simple test with a ' - 'link ' - 'file' - ) - content = Page(**args).get_content('http://notmyidea.org') - self.assertEqual(content, expected_output) - - def test_intrasite_link_markdown_spaces(self): - cls_name = '_DummyArticle' - article = type(cls_name, (object,), {'url': 'article-spaces.html'}) - - args = self.page_kwargs.copy() - args['settings'] = get_settings() - args['source_path'] = 'content' - args['context']['generated_content'] = {'article spaces.rst': article} - - # An intrasite link via filename with %20 as a space - args['content'] = ( - 'A simple test, with a ' - 'link' - ) - content = Page(**args).get_content('http://notmyidea.org') - self.assertEqual( - content, - 'A simple test, with a ' - 'link' - ) - - def test_intrasite_link_source_and_generated(self): - """Test linking both to the source and the generated article - """ - cls_name = '_DummyAsset' - - args = self.page_kwargs.copy() - args['settings'] = get_settings() - args['source_path'] = 'content' - args['context']['generated_content'] = { - 'article.rst': type(cls_name, (object,), {'url': 'article.html'})} - args['context']['static_content'] = { - 'article.rst': type(cls_name, (object,), {'url': 'article.rst'})} - - args['content'] = ( - 'A simple test, with a link to an' - 'article and its' - 'source' - ) - content = Page(**args).get_content('http://notmyidea.org') - self.assertEqual( - content, - 'A simple test, with a link to an' - 'article and its' - 'source' - ) - - def test_intrasite_link_to_static_content_with_filename(self): - """Test linking to a static resource with deprecated {filename} - """ - cls_name = '_DummyAsset' - - args = self.page_kwargs.copy() - args['settings'] = get_settings() - args['source_path'] = 'content' - args['context']['static_content'] = { - 'poster.jpg': - type(cls_name, (object,), {'url': 'images/poster.jpg'})} - - args['content'] = ( - 'A simple test, with a link to a' - 'poster' - ) - content = Page(**args).get_content('http://notmyidea.org') - self.assertEqual( - content, - 'A simple test, with a link to a' - 'poster' - ) - - def test_multiple_authors(self): - """Test article with multiple authors.""" - args = self.page_kwargs.copy() - content = Page(**args) - assert content.authors == [content.author] - args['metadata'].pop('author') - args['metadata']['authors'] = [Author('First Author', DEFAULT_CONFIG), - Author('Second Author', DEFAULT_CONFIG)] - content = Page(**args) - assert content.authors - assert content.author == content.authors[0] - - -class TestArticle(TestBase): - def test_template(self): - # Articles default to article, metadata overwrites - default_article = Article(**self.page_kwargs) - self.assertEqual('article', default_article.template) - article_kwargs = self._copy_page_kwargs() - article_kwargs['metadata']['template'] = 'custom' - custom_article = Article(**article_kwargs) - self.assertEqual('custom', custom_article.template) - - def test_slugify_category_author(self): - settings = get_settings() - settings['SLUG_REGEX_SUBSTITUTIONS'] = [ - (r'C#', 'csharp'), - (r'[^\w\s-]', ''), - (r'(?u)\A\s*', ''), - (r'(?u)\s*\Z', ''), - (r'[-\s]+', '-'), - ] - settings['ARTICLE_URL'] = '{author}/{category}/{slug}/' - settings['ARTICLE_SAVE_AS'] = '{author}/{category}/{slug}/index.html' - article_kwargs = self._copy_page_kwargs() - article_kwargs['metadata']['author'] = Author("O'Brien", settings) - article_kwargs['metadata']['category'] = Category( - 'C# & stuff', settings) - article_kwargs['metadata']['title'] = 'fnord' - article_kwargs['settings'] = settings - article = Article(**article_kwargs) - self.assertEqual(article.url, 'obrien/csharp-stuff/fnord/') - self.assertEqual( - article.save_as, 'obrien/csharp-stuff/fnord/index.html') - - def test_slugify_with_author_substitutions(self): - settings = get_settings() - settings['AUTHOR_REGEX_SUBSTITUTIONS'] = [ - ('Alexander Todorov', 'atodorov'), - ('Krasimir Tsonev', 'krasimir'), - (r'[^\w\s-]', ''), - (r'(?u)\A\s*', ''), - (r'(?u)\s*\Z', ''), - (r'[-\s]+', '-'), - ] - settings['ARTICLE_URL'] = 'blog/{author}/{slug}/' - settings['ARTICLE_SAVE_AS'] = 'blog/{author}/{slug}/index.html' - article_kwargs = self._copy_page_kwargs() - article_kwargs['metadata']['author'] = Author('Alexander Todorov', - settings) - article_kwargs['metadata']['title'] = 'fnord' - article_kwargs['settings'] = settings - article = Article(**article_kwargs) - self.assertEqual(article.url, 'blog/atodorov/fnord/') - self.assertEqual(article.save_as, 'blog/atodorov/fnord/index.html') - - def test_slugify_category_with_dots(self): - settings = get_settings() - settings['CATEGORY_REGEX_SUBSTITUTIONS'] = [ - ('Fedora QA', 'fedora.qa'), - ] - settings['ARTICLE_URL'] = '{category}/{slug}/' - article_kwargs = self._copy_page_kwargs() - article_kwargs['metadata']['category'] = Category('Fedora QA', - settings) - article_kwargs['metadata']['title'] = 'This Week in Fedora QA' - article_kwargs['settings'] = settings - article = Article(**article_kwargs) - self.assertEqual(article.url, 'fedora.qa/this-week-in-fedora-qa/') - - def test_valid_save_as_detects_breakout(self): - settings = get_settings() - article_kwargs = self._copy_page_kwargs() - article_kwargs['metadata']['slug'] = '../foo' - article_kwargs['settings'] = settings - article = Article(**article_kwargs) - self.assertFalse(article._has_valid_save_as()) - - def test_valid_save_as_detects_breakout_to_root(self): - settings = get_settings() - article_kwargs = self._copy_page_kwargs() - article_kwargs['metadata']['slug'] = '/foo' - article_kwargs['settings'] = settings - article = Article(**article_kwargs) - self.assertFalse(article._has_valid_save_as()) - - def test_valid_save_as_passes_valid(self): - settings = get_settings() - article_kwargs = self._copy_page_kwargs() - article_kwargs['metadata']['slug'] = 'foo' - article_kwargs['settings'] = settings - article = Article(**article_kwargs) - self.assertTrue(article._has_valid_save_as()) - - -class TestStatic(LoggedTestCase): - - def setUp(self): - super().setUp() - self.settings = get_settings( - STATIC_SAVE_AS='{path}', - STATIC_URL='{path}', - PAGE_SAVE_AS=os.path.join('outpages', '{slug}.html'), - PAGE_URL='outpages/{slug}.html') - self.context = get_context(self.settings) - - self.static = Static(content=None, metadata={}, settings=self.settings, - source_path=posix_join('dir', 'foo.jpg'), - context=self.context) - - self.context['static_content'][self.static.source_path] = self.static - - def tearDown(self): - pass - - def test_attach_to_same_dir(self): - """attach_to() overrides a static file's save_as and url. - """ - page = Page( - content="fake page", - metadata={'title': 'fakepage'}, - settings=self.settings, - source_path=os.path.join('dir', 'fakepage.md')) - self.static.attach_to(page) - - expected_save_as = os.path.join('outpages', 'foo.jpg') - self.assertEqual(self.static.save_as, expected_save_as) - self.assertEqual(self.static.url, path_to_url(expected_save_as)) - - def test_attach_to_parent_dir(self): - """attach_to() preserves dirs inside the linking document dir. - """ - page = Page(content="fake page", metadata={'title': 'fakepage'}, - settings=self.settings, source_path='fakepage.md') - self.static.attach_to(page) - - expected_save_as = os.path.join('outpages', 'dir', 'foo.jpg') - self.assertEqual(self.static.save_as, expected_save_as) - self.assertEqual(self.static.url, path_to_url(expected_save_as)) - - def test_attach_to_other_dir(self): - """attach_to() ignores dirs outside the linking document dir. - """ - page = Page(content="fake page", - metadata={'title': 'fakepage'}, settings=self.settings, - source_path=os.path.join('dir', 'otherdir', 'fakepage.md')) - self.static.attach_to(page) - - expected_save_as = os.path.join('outpages', 'foo.jpg') - self.assertEqual(self.static.save_as, expected_save_as) - self.assertEqual(self.static.url, path_to_url(expected_save_as)) - - def test_attach_to_ignores_subsequent_calls(self): - """attach_to() does nothing when called a second time. - """ - page = Page(content="fake page", - metadata={'title': 'fakepage'}, settings=self.settings, - source_path=os.path.join('dir', 'fakepage.md')) - - self.static.attach_to(page) - - otherdir_settings = self.settings.copy() - otherdir_settings.update(dict( - PAGE_SAVE_AS=os.path.join('otherpages', '{slug}.html'), - PAGE_URL='otherpages/{slug}.html')) - otherdir_page = Page( - content="other page", - metadata={'title': 'otherpage'}, - settings=otherdir_settings, - source_path=os.path.join('dir', 'otherpage.md')) - - self.static.attach_to(otherdir_page) - - otherdir_save_as = os.path.join('otherpages', 'foo.jpg') - self.assertNotEqual(self.static.save_as, otherdir_save_as) - self.assertNotEqual(self.static.url, path_to_url(otherdir_save_as)) - - def test_attach_to_does_nothing_after_save_as_referenced(self): - """attach_to() does nothing if the save_as was already referenced. - (For example, by a {static} link an a document processed earlier.) - """ - original_save_as = self.static.save_as - - page = Page( - content="fake page", - metadata={'title': 'fakepage'}, - settings=self.settings, - source_path=os.path.join('dir', 'fakepage.md')) - self.static.attach_to(page) - - self.assertEqual(self.static.save_as, original_save_as) - self.assertEqual(self.static.url, path_to_url(original_save_as)) - - def test_attach_to_does_nothing_after_url_referenced(self): - """attach_to() does nothing if the url was already referenced. - (For example, by a {static} link an a document processed earlier.) - """ - original_url = self.static.url - - page = Page( - content="fake page", - metadata={'title': 'fakepage'}, - settings=self.settings, - source_path=os.path.join('dir', 'fakepage.md')) - self.static.attach_to(page) - - self.assertEqual(self.static.save_as, self.static.source_path) - self.assertEqual(self.static.url, original_url) - - def test_attach_to_does_not_override_an_override(self): - """attach_to() does not override paths that were overridden elsewhere. - (For example, by the user with EXTRA_PATH_METADATA) - """ - customstatic = Static( - content=None, - metadata=dict(save_as='customfoo.jpg', url='customfoo.jpg'), - settings=self.settings, - source_path=os.path.join('dir', 'foo.jpg'), - context=self.settings.copy()) - - page = Page( - content="fake page", - metadata={'title': 'fakepage'}, settings=self.settings, - source_path=os.path.join('dir', 'fakepage.md')) - - customstatic.attach_to(page) - - self.assertEqual(customstatic.save_as, 'customfoo.jpg') - self.assertEqual(customstatic.url, 'customfoo.jpg') - - def test_attach_link_syntax(self): - """{attach} link syntax triggers output path override & url replacement. - """ - html = 'link' - page = Page( - content=html, - metadata={'title': 'fakepage'}, - settings=self.settings, - source_path=os.path.join('dir', 'otherdir', 'fakepage.md'), - context=self.context) - content = page.get_content('') - - self.assertNotEqual( - content, html, - "{attach} link syntax did not trigger URL replacement.") - - expected_save_as = os.path.join('outpages', 'foo.jpg') - self.assertEqual(self.static.save_as, expected_save_as) - self.assertEqual(self.static.url, path_to_url(expected_save_as)) - - def test_tag_link_syntax(self): - "{tag} link syntax triggers url replacement." - - html = 'link' - page = Page( - content=html, - metadata={'title': 'fakepage'}, - settings=self.settings, - source_path=os.path.join('dir', 'otherdir', 'fakepage.md'), - context=self.context) - content = page.get_content('') - - self.assertNotEqual(content, html) - - def test_category_link_syntax(self): - "{category} link syntax triggers url replacement." - - html = 'link' - page = Page( - content=html, - metadata={'title': 'fakepage'}, - settings=self.settings, - source_path=os.path.join('dir', 'otherdir', 'fakepage.md'), - context=self.context) - content = page.get_content('') - - self.assertNotEqual(content, html) - - def test_author_link_syntax(self): - "{author} link syntax triggers url replacement." - - html = 'link' - page = Page( - content=html, - metadata={'title': 'fakepage'}, - settings=self.settings, - source_path=os.path.join('dir', 'otherdir', 'fakepage.md'), - context=self.context) - content = page.get_content('') - - self.assertNotEqual(content, html) - - def test_index_link_syntax(self): - "{index} link syntax triggers url replacement." - - html = 'link' - page = Page( - content=html, - metadata={'title': 'fakepage'}, - settings=self.settings, - source_path=os.path.join('dir', 'otherdir', 'fakepage.md'), - context=self.context) - content = page.get_content('') - - self.assertNotEqual(content, html) - - expected_html = ('link') - self.assertEqual(content, expected_html) - - def test_unknown_link_syntax(self): - "{unknown} link syntax should trigger warning." - - html = 'link' - page = Page(content=html, - metadata={'title': 'fakepage'}, settings=self.settings, - source_path=os.path.join('dir', 'otherdir', 'fakepage.md'), - context=self.context) - content = page.get_content('') - - self.assertEqual(content, html) - self.assertLogCountEqual( - count=1, - msg="Replacement Indicator 'unknown' not recognized, " - "skipping replacement", - level=logging.WARNING) - - def test_link_to_unknown_file(self): - "{filename} link to unknown file should trigger warning." - - html = 'link' - page = Page(content=html, - metadata={'title': 'fakepage'}, settings=self.settings, - source_path=os.path.join('dir', 'otherdir', 'fakepage.md'), - context=self.context) - content = page.get_content('') - - self.assertEqual(content, html) - self.assertLogCountEqual( - count=1, - msg="Unable to find 'foo', skipping url replacement.", - level=logging.WARNING) - - def test_index_link_syntax_with_spaces(self): - """{index} link syntax triggers url replacement - with spaces around the equal sign.""" - - html = 'link' - page = Page( - content=html, - metadata={'title': 'fakepage'}, - settings=self.settings, - source_path=os.path.join('dir', 'otherdir', 'fakepage.md'), - context=self.context) - content = page.get_content('') - - self.assertNotEqual(content, html) - - expected_html = ('link') - self.assertEqual(content, expected_html) - - def test_not_save_as_draft(self): - """Static.save_as is not affected by draft status.""" - - static = Static( - content=None, - metadata=dict(status='draft',), - settings=self.settings, - source_path=os.path.join('dir', 'foo.jpg'), - context=self.settings.copy()) - - expected_save_as = posixize_path(os.path.join('dir', 'foo.jpg')) - self.assertEqual(static.status, 'draft') - self.assertEqual(static.save_as, expected_save_as) - self.assertEqual(static.url, path_to_url(expected_save_as)) diff --git a/pelican/tests/test_generators.py b/pelican/tests/test_generators.py deleted file mode 100644 index 0a4a8fdc..00000000 --- a/pelican/tests/test_generators.py +++ /dev/null @@ -1,1244 +0,0 @@ -import locale -import os -import sys -from shutil import copy, rmtree -from tempfile import mkdtemp -from unittest.mock import MagicMock - -from pelican.generators import (ArticlesGenerator, Generator, PagesGenerator, - PelicanTemplateNotFound, StaticGenerator, - TemplatePagesGenerator) -from pelican.tests.support import (can_symlink, get_context, get_settings, - unittest) -from pelican.writers import Writer - - -CUR_DIR = os.path.dirname(__file__) -CONTENT_DIR = os.path.join(CUR_DIR, 'content') - - -class TestGenerator(unittest.TestCase): - def setUp(self): - self.old_locale = locale.setlocale(locale.LC_ALL) - locale.setlocale(locale.LC_ALL, 'C') - self.settings = get_settings() - self.settings['READERS'] = {'asc': None} - self.generator = Generator(self.settings.copy(), self.settings, - CUR_DIR, self.settings['THEME'], None) - - def tearDown(self): - locale.setlocale(locale.LC_ALL, self.old_locale) - - def test_include_path(self): - self.settings['IGNORE_FILES'] = {'ignored1.rst', 'ignored2.rst'} - - filename = os.path.join(CUR_DIR, 'content', 'article.rst') - include_path = self.generator._include_path - self.assertTrue(include_path(filename)) - self.assertTrue(include_path(filename, extensions=('rst',))) - self.assertFalse(include_path(filename, extensions=('md',))) - - ignored_file = os.path.join(CUR_DIR, 'content', 'ignored1.rst') - self.assertFalse(include_path(ignored_file)) - - def test_get_files_exclude(self): - """Test that Generator.get_files() properly excludes directories. - """ - # We use our own Generator so we can give it our own content path - generator = Generator( - context=self.settings.copy(), - settings=self.settings, - path=os.path.join(CUR_DIR, 'nested_content'), - theme=self.settings['THEME'], output_path=None) - - filepaths = generator.get_files(paths=['maindir']) - found_files = {os.path.basename(f) for f in filepaths} - expected_files = {'maindir.md', 'subdir.md'} - self.assertFalse( - expected_files - found_files, - "get_files() failed to find one or more files") - - # Test string as `paths` argument rather than list - filepaths = generator.get_files(paths='maindir') - found_files = {os.path.basename(f) for f in filepaths} - expected_files = {'maindir.md', 'subdir.md'} - self.assertFalse( - expected_files - found_files, - "get_files() failed to find one or more files") - - filepaths = generator.get_files(paths=[''], exclude=['maindir']) - found_files = {os.path.basename(f) for f in filepaths} - self.assertNotIn( - 'maindir.md', found_files, - "get_files() failed to exclude a top-level directory") - self.assertNotIn( - 'subdir.md', found_files, - "get_files() failed to exclude a subdir of an excluded directory") - - filepaths = generator.get_files( - paths=[''], - exclude=[os.path.join('maindir', 'subdir')]) - found_files = {os.path.basename(f) for f in filepaths} - self.assertNotIn( - 'subdir.md', found_files, - "get_files() failed to exclude a subdirectory") - - filepaths = generator.get_files(paths=[''], exclude=['subdir']) - found_files = {os.path.basename(f) for f in filepaths} - self.assertIn( - 'subdir.md', found_files, - "get_files() excluded a subdirectory by name, ignoring its path") - - def test_custom_jinja_environment(self): - """ - Test that setting the JINJA_ENVIRONMENT - properly gets set from the settings config - """ - settings = get_settings() - comment_start_string = 'abc' - comment_end_string = '/abc' - settings['JINJA_ENVIRONMENT'] = { - 'comment_start_string': comment_start_string, - 'comment_end_string': comment_end_string - } - generator = Generator(settings.copy(), settings, - CUR_DIR, settings['THEME'], None) - self.assertEqual(comment_start_string, - generator.env.comment_start_string) - self.assertEqual(comment_end_string, - generator.env.comment_end_string) - - def test_theme_overrides(self): - """ - Test that the THEME_TEMPLATES_OVERRIDES configuration setting is - utilized correctly in the Generator. - """ - override_dirs = (os.path.join(CUR_DIR, 'theme_overrides', 'level1'), - os.path.join(CUR_DIR, 'theme_overrides', 'level2')) - self.settings['THEME_TEMPLATES_OVERRIDES'] = override_dirs - generator = Generator( - context=self.settings.copy(), - settings=self.settings, - path=CUR_DIR, - theme=self.settings['THEME'], - output_path=None) - - filename = generator.get_template('article').filename - self.assertEqual(override_dirs[0], os.path.dirname(filename)) - self.assertEqual('article.html', os.path.basename(filename)) - - filename = generator.get_template('authors').filename - self.assertEqual(override_dirs[1], os.path.dirname(filename)) - self.assertEqual('authors.html', os.path.basename(filename)) - - filename = generator.get_template('taglist').filename - self.assertEqual(os.path.join(self.settings['THEME'], 'templates'), - os.path.dirname(filename)) - self.assertNotIn(os.path.dirname(filename), override_dirs) - self.assertEqual('taglist.html', os.path.basename(filename)) - - def test_simple_prefix(self): - """ - Test `!simple` theme prefix. - """ - filename = self.generator.get_template('!simple/authors').filename - expected_path = os.path.join( - os.path.dirname(CUR_DIR), 'themes', 'simple', 'templates') - self.assertEqual(expected_path, os.path.dirname(filename)) - self.assertEqual('authors.html', os.path.basename(filename)) - - def test_theme_prefix(self): - """ - Test `!theme` theme prefix. - """ - filename = self.generator.get_template('!theme/authors').filename - expected_path = os.path.join( - os.path.dirname(CUR_DIR), 'themes', 'notmyidea', 'templates') - self.assertEqual(expected_path, os.path.dirname(filename)) - self.assertEqual('authors.html', os.path.basename(filename)) - - def test_bad_prefix(self): - """ - Test unknown/bad theme prefix throws exception. - """ - self.assertRaises(PelicanTemplateNotFound, self.generator.get_template, - '!UNKNOWN/authors') - - -class TestArticlesGenerator(unittest.TestCase): - - @classmethod - def setUpClass(cls): - settings = get_settings() - settings['DEFAULT_CATEGORY'] = 'Default' - settings['DEFAULT_DATE'] = (1970, 1, 1) - settings['READERS'] = {'asc': None} - settings['CACHE_CONTENT'] = False - context = get_context(settings) - - cls.generator = ArticlesGenerator( - context=context, settings=settings, - path=CONTENT_DIR, theme=settings['THEME'], output_path=None) - cls.generator.generate_context() - cls.articles = cls.distill_articles(cls.generator.articles) - cls.drafts = cls.distill_articles(cls.generator.drafts) - cls.hidden_articles = cls.distill_articles(cls.generator.hidden_articles) - - def setUp(self): - self.temp_cache = mkdtemp(prefix='pelican_cache.') - - def tearDown(self): - rmtree(self.temp_cache) - - @staticmethod - def distill_articles(articles): - return [[article.title, article.status, article.category.name, - article.template] for article in articles] - - def test_generate_feeds(self): - settings = get_settings() - settings['CACHE_PATH'] = self.temp_cache - generator = ArticlesGenerator( - context=settings, settings=settings, - path=None, theme=settings['THEME'], output_path=None) - writer = MagicMock() - generator.generate_feeds(writer) - writer.write_feed.assert_called_with([], settings, - 'feeds/all.atom.xml', - 'feeds/all.atom.xml') - - generator = ArticlesGenerator( - context=settings, settings=get_settings(FEED_ALL_ATOM=None), - path=None, theme=settings['THEME'], output_path=None) - writer = MagicMock() - generator.generate_feeds(writer) - self.assertFalse(writer.write_feed.called) - - def test_generate_feeds_override_url(self): - settings = get_settings() - settings['CACHE_PATH'] = self.temp_cache - settings['FEED_ALL_ATOM_URL'] = 'feeds/atom/all/' - generator = ArticlesGenerator( - context=settings, settings=settings, - path=None, theme=settings['THEME'], output_path=None) - writer = MagicMock() - generator.generate_feeds(writer) - writer.write_feed.assert_called_with([], settings, - 'feeds/all.atom.xml', - 'feeds/atom/all/') - - def test_generate_context(self): - articles_expected = [ - ['Article title', 'published', 'Default', 'article'], - ['Article with markdown and summary metadata multi', 'published', - 'Default', 'article'], - ['Article with markdown and nested summary metadata', 'published', - 'Default', 'article'], - ['Article with markdown and summary metadata single', 'published', - 'Default', 'article'], - ['Article with markdown containing footnotes', 'published', - 'Default', 'article'], - ['Article with template', 'published', 'Default', 'custom'], - ['Metadata tags as list!', 'published', 'Default', 'article'], - ['Rst with filename metadata', 'published', 'yeah', 'article'], - ['One -, two --, three --- dashes!', 'published', 'Default', - 'article'], - ['One -, two --, three --- dashes!', 'published', 'Default', - 'article'], - ['Test Markdown extensions', 'published', 'Default', 'article'], - ['Test markdown File', 'published', 'test', 'article'], - ['Test md File', 'published', 'test', 'article'], - ['Test mdown File', 'published', 'test', 'article'], - ['Test metadata duplicates', 'published', 'test', 'article'], - ['Test mkd File', 'published', 'test', 'article'], - ['This is a super article !', 'published', 'Yeah', 'article'], - ['This is a super article !', 'published', 'Yeah', 'article'], - ['Article with Nonconformant HTML meta tags', 'published', - 'Default', 'article'], - ['This is a super article !', 'published', 'yeah', 'article'], - ['This is a super article !', 'published', 'yeah', 'article'], - ['This is a super article !', 'published', 'yeah', 'article'], - ['This is a super article !', 'published', 'yeah', 'article'], - ['This is a super article !', 'published', 'yeah', 'article'], - ['This is a super article !', 'published', 'yeah', 'article'], - ['This is a super article !', 'published', 'yeah', 'article'], - ['This is a super article !', 'published', 'yeah', 'article'], - ['This is a super article !', 'published', 'Default', 'article'], - ['Article with an inline SVG', 'published', 'Default', 'article'], - ['This is an article with category !', 'published', 'yeah', - 'article'], - ['This is an article with multiple authors!', 'published', - 'Default', 'article'], - ['This is an article with multiple authors!', 'published', - 'Default', 'article'], - ['This is an article with multiple authors in list format!', - 'published', 'Default', 'article'], - ['This is an article with multiple authors in lastname, ' - 'firstname format!', 'published', 'Default', 'article'], - ['This is an article without category !', 'published', 'Default', - 'article'], - ['This is an article without category !', 'published', - 'TestCategory', 'article'], - ['An Article With Code Block To Test Typogrify Ignore', - 'published', 'Default', 'article'], - ['マックOS X 10.8でパイソンとVirtualenvをインストールと設定', - 'published', '指導書', 'article'], - ] - self.assertEqual(sorted(articles_expected), sorted(self.articles)) - - def test_articles_draft(self): - draft_articles_expected = [ - ['Draft article', 'draft', 'Default', 'article'], - ] - self.assertEqual(sorted(draft_articles_expected), sorted(self.drafts)) - - def test_articles_hidden(self): - hidden_articles_expected = [ - ['Hidden article', 'hidden', 'Default', 'article'], - ] - self.assertEqual(sorted(hidden_articles_expected), sorted(self.hidden_articles)) - - def test_generate_categories(self): - # test for name - # categories are grouped by slug; if two categories have the same slug - # but different names they will be grouped together, the first one in - # terms of process order will define the name for that category - categories = [cat.name for cat, _ in self.generator.categories] - categories_alternatives = ( - sorted(['Default', 'TestCategory', 'Yeah', 'test', '指導書']), - sorted(['Default', 'TestCategory', 'yeah', 'test', '指導書']), - ) - self.assertIn(sorted(categories), categories_alternatives) - # test for slug - categories = [cat.slug for cat, _ in self.generator.categories] - categories_expected = ['default', 'testcategory', 'yeah', 'test', - 'zhi-dao-shu'] - self.assertEqual(sorted(categories), sorted(categories_expected)) - - def test_do_not_use_folder_as_category(self): - settings = get_settings() - settings['DEFAULT_CATEGORY'] = 'Default' - settings['DEFAULT_DATE'] = (1970, 1, 1) - settings['USE_FOLDER_AS_CATEGORY'] = False - settings['CACHE_PATH'] = self.temp_cache - settings['READERS'] = {'asc': None} - context = get_context(settings) - generator = ArticlesGenerator( - context=context, settings=settings, - path=CONTENT_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - # test for name - # categories are grouped by slug; if two categories have the same slug - # but different names they will be grouped together, the first one in - # terms of process order will define the name for that category - categories = [cat.name for cat, _ in generator.categories] - categories_alternatives = ( - sorted(['Default', 'Yeah', 'test', '指導書']), - sorted(['Default', 'yeah', 'test', '指導書']), - ) - self.assertIn(sorted(categories), categories_alternatives) - # test for slug - categories = [cat.slug for cat, _ in generator.categories] - categories_expected = ['default', 'yeah', 'test', 'zhi-dao-shu'] - self.assertEqual(sorted(categories), sorted(categories_expected)) - - def test_direct_templates_save_as_url_default(self): - - settings = get_settings() - settings['CACHE_PATH'] = self.temp_cache - context = get_context(settings) - generator = ArticlesGenerator( - context=context, settings=settings, - path=None, theme=settings['THEME'], output_path=None) - write = MagicMock() - generator.generate_direct_templates(write) - write.assert_called_with("archives.html", - generator.get_template("archives"), context, - articles=generator.articles, - dates=generator.dates, blog=True, - template_name='archives', - page_name='archives', url="archives.html") - - def test_direct_templates_save_as_url_modified(self): - - settings = get_settings() - settings['DIRECT_TEMPLATES'] = ['archives'] - settings['ARCHIVES_SAVE_AS'] = 'archives/index.html' - settings['ARCHIVES_URL'] = 'archives/' - settings['CACHE_PATH'] = self.temp_cache - generator = ArticlesGenerator( - context=settings, settings=settings, - path=None, theme=settings['THEME'], output_path=None) - write = MagicMock() - generator.generate_direct_templates(write) - write.assert_called_with("archives/index.html", - generator.get_template("archives"), settings, - articles=generator.articles, - dates=generator.dates, blog=True, - template_name='archives', - page_name='archives/index', - url="archives/") - - def test_direct_templates_save_as_false(self): - - settings = get_settings() - settings['DIRECT_TEMPLATES'] = ['archives'] - settings['ARCHIVES_SAVE_AS'] = False - settings['CACHE_PATH'] = self.temp_cache - generator = ArticlesGenerator( - context=settings, settings=settings, - path=None, theme=settings['THEME'], output_path=None) - write = MagicMock() - generator.generate_direct_templates(write) - self.assertEqual(write.call_count, 0) - - def test_per_article_template(self): - """ - Custom template articles get the field but standard/unset are None - """ - custom_template = ['Article with template', 'published', 'Default', - 'custom'] - standard_template = ['This is a super article !', 'published', 'Yeah', - 'article'] - self.assertIn(custom_template, self.articles) - self.assertIn(standard_template, self.articles) - - def test_period_in_timeperiod_archive(self): - """ - Test that the context of a generated period_archive is passed - 'period' : a tuple of year, month, day according to the time period - """ - old_locale = locale.setlocale(locale.LC_ALL) - locale.setlocale(locale.LC_ALL, 'C') - settings = get_settings() - - settings['YEAR_ARCHIVE_SAVE_AS'] = 'posts/{date:%Y}/index.html' - settings['YEAR_ARCHIVE_URL'] = 'posts/{date:%Y}/' - settings['CACHE_PATH'] = self.temp_cache - context = get_context(settings) - generator = ArticlesGenerator( - context=context, settings=settings, - path=CONTENT_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - write = MagicMock() - generator.generate_period_archives(write) - dates = [d for d in generator.dates if d.date.year == 1970] - articles = [d for d in generator.articles if d.date.year == 1970] - self.assertEqual(len(dates), 1) - # among other things it must have at least been called with this - context["period"] = (1970,) - context["period_num"] = (1970,) - write.assert_called_with("posts/1970/index.html", - generator.get_template("period_archives"), - context, blog=True, articles=articles, - dates=dates, template_name='period_archives', - url="posts/1970/", - all_articles=generator.articles) - - settings['MONTH_ARCHIVE_SAVE_AS'] = \ - 'posts/{date:%Y}/{date:%b}/index.html' - settings['MONTH_ARCHIVE_URL'] = \ - 'posts/{date:%Y}/{date:%b}/' - context = get_context(settings) - generator = ArticlesGenerator( - context=context, settings=settings, - path=CONTENT_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - write = MagicMock() - generator.generate_period_archives(write) - dates = [d for d in generator.dates - if d.date.year == 1970 and d.date.month == 1] - articles = [d for d in generator.articles - if d.date.year == 1970 and d.date.month == 1] - self.assertEqual(len(dates), 1) - context["period"] = (1970, "January") - context["period_num"] = (1970, 1) - # among other things it must have at least been called with this - write.assert_called_with("posts/1970/Jan/index.html", - generator.get_template("period_archives"), - context, blog=True, articles=articles, - dates=dates, template_name='period_archives', - url="posts/1970/Jan/", - all_articles=generator.articles) - - settings['DAY_ARCHIVE_SAVE_AS'] = \ - 'posts/{date:%Y}/{date:%b}/{date:%d}/index.html' - settings['DAY_ARCHIVE_URL'] = \ - 'posts/{date:%Y}/{date:%b}/{date:%d}/' - context = get_context(settings) - generator = ArticlesGenerator( - context=context, settings=settings, - path=CONTENT_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - write = MagicMock() - generator.generate_period_archives(write) - dates = [ - d for d in generator.dates if - d.date.year == 1970 and - d.date.month == 1 and - d.date.day == 1 - ] - articles = [ - d for d in generator.articles if - d.date.year == 1970 and - d.date.month == 1 and - d.date.day == 1 - ] - self.assertEqual(len(dates), 1) - context["period"] = (1970, "January", 1) - context["period_num"] = (1970, 1, 1) - # among other things it must have at least been called with this - write.assert_called_with("posts/1970/Jan/01/index.html", - generator.get_template("period_archives"), - context, blog=True, articles=articles, - dates=dates, template_name='period_archives', - url="posts/1970/Jan/01/", - all_articles=generator.articles) - locale.setlocale(locale.LC_ALL, old_locale) - - def test_nonexistent_template(self): - """Attempt to load a non-existent template""" - settings = get_settings() - context = get_context(settings) - generator = ArticlesGenerator( - context=context, settings=settings, - path=None, theme=settings['THEME'], output_path=None) - self.assertRaises(Exception, generator.get_template, "not_a_template") - - def test_generate_authors(self): - """Check authors generation.""" - authors = [author.name for author, _ in self.generator.authors] - authors_expected = sorted( - ['Alexis Métaireau', 'Author, First', 'Author, Second', - 'First Author', 'Second Author']) - self.assertEqual(sorted(authors), authors_expected) - # test for slug - authors = [author.slug for author, _ in self.generator.authors] - authors_expected = ['alexis-metaireau', 'author-first', - 'author-second', 'first-author', 'second-author'] - self.assertEqual(sorted(authors), sorted(authors_expected)) - - def test_standard_metadata_in_default_metadata(self): - settings = get_settings() - settings['CACHE_CONTENT'] = False - settings['DEFAULT_CATEGORY'] = 'Default' - settings['DEFAULT_DATE'] = (1970, 1, 1) - settings['DEFAULT_METADATA'] = (('author', 'Blogger'), - # category will be ignored in favor of - # DEFAULT_CATEGORY - ('category', 'Random'), - ('tags', 'general, untagged')) - context = get_context(settings) - generator = ArticlesGenerator( - context=context, settings=settings, - path=CONTENT_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - - authors = sorted([author.name for author, _ in generator.authors]) - authors_expected = sorted(['Alexis Métaireau', 'Blogger', - 'Author, First', 'Author, Second', - 'First Author', 'Second Author']) - self.assertEqual(authors, authors_expected) - - categories = sorted([category.name - for category, _ in generator.categories]) - categories_expected = [ - sorted(['Default', 'TestCategory', 'yeah', 'test', '指導書']), - sorted(['Default', 'TestCategory', 'Yeah', 'test', '指導書'])] - self.assertIn(categories, categories_expected) - - tags = sorted([tag.name for tag in generator.tags]) - tags_expected = sorted(['bar', 'foo', 'foobar', 'general', 'untagged', - 'パイソン', 'マック']) - self.assertEqual(tags, tags_expected) - - def test_article_order_by(self): - settings = get_settings() - settings['DEFAULT_CATEGORY'] = 'Default' - settings['DEFAULT_DATE'] = (1970, 1, 1) - settings['ARTICLE_ORDER_BY'] = 'title' - context = get_context(settings) - - generator = ArticlesGenerator( - context=context, settings=settings, - path=CONTENT_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - - expected = [ - 'An Article With Code Block To Test Typogrify Ignore', - 'Article title', - 'Article with Nonconformant HTML meta tags', - 'Article with an inline SVG', - 'Article with markdown and nested summary metadata', - 'Article with markdown and summary metadata multi', - 'Article with markdown and summary metadata single', - 'Article with markdown containing footnotes', - 'Article with template', - 'Metadata tags as list!', - 'One -, two --, three --- dashes!', - 'One -, two --, three --- dashes!', - 'Rst with filename metadata', - 'Test Markdown extensions', - 'Test markdown File', - 'Test md File', - 'Test mdown File', - 'Test metadata duplicates', - 'Test mkd File', - 'This is a super article !', - 'This is a super article !', - 'This is a super article !', - 'This is a super article !', - 'This is a super article !', - 'This is a super article !', - 'This is a super article !', - 'This is a super article !', - 'This is a super article !', - 'This is a super article !', - 'This is a super article !', - 'This is an article with category !', - ('This is an article with multiple authors in lastname, ' - 'firstname format!'), - 'This is an article with multiple authors in list format!', - 'This is an article with multiple authors!', - 'This is an article with multiple authors!', - 'This is an article without category !', - 'This is an article without category !', - 'マックOS X 10.8でパイソンとVirtualenvをインストールと設定'] - - articles = [article.title for article in generator.articles] - self.assertEqual(articles, expected) - - # reversed title - settings = get_settings() - settings['DEFAULT_CATEGORY'] = 'Default' - settings['DEFAULT_DATE'] = (1970, 1, 1) - settings['ARTICLE_ORDER_BY'] = 'reversed-title' - context = get_context(settings) - - generator = ArticlesGenerator( - context=context, settings=settings, - path=CONTENT_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - - articles = [article.title for article in generator.articles] - self.assertEqual(articles, list(reversed(expected))) - - -class TestPageGenerator(unittest.TestCase): - # Note: Every time you want to test for a new field; Make sure the test - # pages in "TestPages" have all the fields Add it to distilled in - # distill_pages Then update the assertEqual in test_generate_context - # to match expected - - def setUp(self): - self.temp_cache = mkdtemp(prefix='pelican_cache.') - - def tearDown(self): - rmtree(self.temp_cache) - - def distill_pages(self, pages): - return [[page.title, page.status, page.template] for page in pages] - - def test_generate_context(self): - settings = get_settings() - settings['CACHE_PATH'] = self.temp_cache - settings['PAGE_PATHS'] = ['TestPages'] # relative to CUR_DIR - settings['DEFAULT_DATE'] = (1970, 1, 1) - context = get_context(settings) - - generator = PagesGenerator( - context=context, settings=settings, - path=CUR_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - pages = self.distill_pages(generator.pages) - hidden_pages = self.distill_pages(generator.hidden_pages) - draft_pages = self.distill_pages(generator.draft_pages) - - pages_expected = [ - ['This is a test page', 'published', 'page'], - ['This is a markdown test page', 'published', 'page'], - ['This is a test page with a preset template', 'published', - 'custom'], - ['Page with a bunch of links', 'published', 'page'], - ['Page with static links', 'published', 'page'], - ['A Page (Test) for sorting', 'published', 'page'], - ] - hidden_pages_expected = [ - ['This is a test hidden page', 'hidden', 'page'], - ['This is a markdown test hidden page', 'hidden', 'page'], - ['This is a test hidden page with a custom template', 'hidden', - 'custom'], - ] - draft_pages_expected = [ - ['This is a test draft page', 'draft', 'page'], - ['This is a markdown test draft page', 'draft', 'page'], - ['This is a test draft page with a custom template', 'draft', - 'custom'], - ] - - self.assertEqual(sorted(pages_expected), sorted(pages)) - self.assertEqual( - sorted(pages_expected), - sorted(self.distill_pages(generator.context['pages']))) - self.assertEqual(sorted(hidden_pages_expected), sorted(hidden_pages)) - self.assertEqual(sorted(draft_pages_expected), sorted(draft_pages)) - self.assertEqual( - sorted(hidden_pages_expected), - sorted(self.distill_pages(generator.context['hidden_pages']))) - self.assertEqual( - sorted(draft_pages_expected), - sorted(self.distill_pages(generator.context['draft_pages']))) - - def test_generate_sorted(self): - settings = get_settings() - settings['PAGE_PATHS'] = ['TestPages'] # relative to CUR_DIR - settings['CACHE_PATH'] = self.temp_cache - settings['DEFAULT_DATE'] = (1970, 1, 1) - context = get_context(settings) - - # default sort (filename) - pages_expected_sorted_by_filename = [ - ['This is a test page', 'published', 'page'], - ['This is a markdown test page', 'published', 'page'], - ['A Page (Test) for sorting', 'published', 'page'], - ['Page with a bunch of links', 'published', 'page'], - ['Page with static links', 'published', 'page'], - ['This is a test page with a preset template', 'published', - 'custom'], - ] - generator = PagesGenerator( - context=context, settings=settings, - path=CUR_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - pages = self.distill_pages(generator.pages) - self.assertEqual(pages_expected_sorted_by_filename, pages) - - # sort by title - pages_expected_sorted_by_title = [ - ['A Page (Test) for sorting', 'published', 'page'], - ['Page with a bunch of links', 'published', 'page'], - ['Page with static links', 'published', 'page'], - ['This is a markdown test page', 'published', 'page'], - ['This is a test page', 'published', 'page'], - ['This is a test page with a preset template', 'published', - 'custom'], - ] - settings['PAGE_ORDER_BY'] = 'title' - context = get_context(settings) - generator = PagesGenerator( - context=context.copy(), settings=settings, - path=CUR_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - pages = self.distill_pages(generator.pages) - self.assertEqual(pages_expected_sorted_by_title, pages) - - # sort by title reversed - pages_expected_sorted_by_title = [ - ['This is a test page with a preset template', 'published', - 'custom'], - ['This is a test page', 'published', 'page'], - ['This is a markdown test page', 'published', 'page'], - ['Page with static links', 'published', 'page'], - ['Page with a bunch of links', 'published', 'page'], - ['A Page (Test) for sorting', 'published', 'page'], - ] - settings['PAGE_ORDER_BY'] = 'reversed-title' - context = get_context(settings) - generator = PagesGenerator( - context=context, settings=settings, - path=CUR_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - pages = self.distill_pages(generator.pages) - self.assertEqual(pages_expected_sorted_by_title, pages) - - def test_tag_and_category_links_on_generated_pages(self): - """ - Test to ensure links of the form {tag}tagname and {category}catname - are generated correctly on pages - """ - settings = get_settings() - settings['PAGE_PATHS'] = ['TestPages'] # relative to CUR_DIR - settings['CACHE_PATH'] = self.temp_cache - settings['DEFAULT_DATE'] = (1970, 1, 1) - context = get_context(settings) - - generator = PagesGenerator( - context=context, settings=settings, - path=CUR_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - pages_by_title = {p.title: p for p in generator.pages} - - test_content = pages_by_title['Page with a bunch of links'].content - self.assertIn('', test_content) - self.assertIn('', test_content) - - def test_static_and_attach_links_on_generated_pages(self): - """ - Test to ensure links of the form {static}filename and {attach}filename - are included in context['static_links'] - """ - settings = get_settings() - settings['PAGE_PATHS'] = ['TestPages/page_with_static_links.md'] - settings['CACHE_PATH'] = self.temp_cache - settings['DEFAULT_DATE'] = (1970, 1, 1) - context = get_context(settings) - - generator = PagesGenerator( - context=context, settings=settings, - path=CUR_DIR, theme=settings['THEME'], output_path=None) - generator.generate_context() - - self.assertIn('pelican/tests/TestPages/image0.jpg', - context['static_links']) - self.assertIn('pelican/tests/TestPages/image1.jpg', - context['static_links']) - - -class TestTemplatePagesGenerator(unittest.TestCase): - - TEMPLATE_CONTENT = "foo: {{ foo }}" - - def setUp(self): - self.temp_content = mkdtemp(prefix='pelicantests.') - self.temp_output = mkdtemp(prefix='pelicantests.') - self.old_locale = locale.setlocale(locale.LC_ALL) - locale.setlocale(locale.LC_ALL, 'C') - - def tearDown(self): - rmtree(self.temp_content) - rmtree(self.temp_output) - locale.setlocale(locale.LC_ALL, self.old_locale) - - def test_generate_output(self): - - settings = get_settings() - settings['STATIC_PATHS'] = ['static'] - settings['TEMPLATE_PAGES'] = { - 'template/source.html': 'generated/file.html' - } - - generator = TemplatePagesGenerator( - context={'foo': 'bar'}, settings=settings, - path=self.temp_content, theme='', output_path=self.temp_output) - - # create a dummy template file - template_dir = os.path.join(self.temp_content, 'template') - template_path = os.path.join(template_dir, 'source.html') - os.makedirs(template_dir) - with open(template_path, 'w') as template_file: - template_file.write(self.TEMPLATE_CONTENT) - - writer = Writer(self.temp_output, settings=settings) - generator.generate_output(writer) - - output_path = os.path.join(self.temp_output, 'generated', 'file.html') - - # output file has been generated - self.assertTrue(os.path.exists(output_path)) - - # output content is correct - with open(output_path) as output_file: - self.assertEqual(output_file.read(), 'foo: bar') - - -class TestStaticGenerator(unittest.TestCase): - - def setUp(self): - self.content_path = os.path.join(CUR_DIR, 'mixed_content') - self.temp_content = mkdtemp(prefix='testcontent.') - self.temp_output = mkdtemp(prefix='testoutput.') - self.settings = get_settings() - self.settings['PATH'] = self.temp_content - self.settings['STATIC_PATHS'] = ["static"] - self.settings['OUTPUT_PATH'] = self.temp_output - os.mkdir(os.path.join(self.temp_content, "static")) - self.startfile = os.path.join(self.temp_content, - "static", "staticfile") - self.endfile = os.path.join(self.temp_output, "static", "staticfile") - self.generator = StaticGenerator( - context=get_context(), - settings=self.settings, - path=self.temp_content, - theme="", - output_path=self.temp_output, - ) - - def tearDown(self): - rmtree(self.temp_content) - rmtree(self.temp_output) - - def set_ancient_mtime(self, path, timestamp=1): - os.utime(path, (timestamp, timestamp)) - - def test_theme_static_paths_dirs(self): - """Test that StaticGenerator properly copies also files mentioned in - TEMPLATE_STATIC_PATHS, not just directories.""" - settings = get_settings(PATH=self.content_path) - context = get_context(settings, staticfiles=[]) - - StaticGenerator( - context=context, settings=settings, - path=settings['PATH'], output_path=self.temp_output, - theme=settings['THEME']).generate_output(None) - - # The content of dirs listed in THEME_STATIC_PATHS (defaulting to - # "static") is put into the output - self.assertTrue(os.path.isdir(os.path.join(self.temp_output, - "theme/css/"))) - self.assertTrue(os.path.isdir(os.path.join(self.temp_output, - "theme/fonts/"))) - - def test_theme_static_paths_files(self): - """Test that StaticGenerator properly copies also files mentioned in - TEMPLATE_STATIC_PATHS, not just directories.""" - settings = get_settings( - PATH=self.content_path, - THEME_STATIC_PATHS=['static/css/fonts.css', 'static/fonts/'],) - context = get_context(settings, staticfiles=[]) - - StaticGenerator( - context=context, settings=settings, - path=settings['PATH'], output_path=self.temp_output, - theme=settings['THEME']).generate_output(None) - - # Only the content of dirs and files listed in THEME_STATIC_PATHS are - # put into the output, not everything from static/ - self.assertFalse(os.path.isdir(os.path.join(self.temp_output, - "theme/css/"))) - self.assertFalse(os.path.isdir(os.path.join(self.temp_output, - "theme/fonts/"))) - - self.assertTrue(os.path.isfile(os.path.join( - self.temp_output, "theme/Yanone_Kaffeesatz_400.eot"))) - self.assertTrue(os.path.isfile(os.path.join( - self.temp_output, "theme/Yanone_Kaffeesatz_400.svg"))) - self.assertTrue(os.path.isfile(os.path.join( - self.temp_output, "theme/Yanone_Kaffeesatz_400.ttf"))) - self.assertTrue(os.path.isfile(os.path.join( - self.temp_output, "theme/Yanone_Kaffeesatz_400.woff"))) - self.assertTrue(os.path.isfile(os.path.join( - self.temp_output, "theme/Yanone_Kaffeesatz_400.woff2"))) - self.assertTrue(os.path.isfile(os.path.join(self.temp_output, - "theme/font.css"))) - self.assertTrue(os.path.isfile(os.path.join(self.temp_output, - "theme/fonts.css"))) - - def test_static_excludes(self): - """Test that StaticGenerator respects STATIC_EXCLUDES. - """ - settings = get_settings( - STATIC_EXCLUDES=['subdir'], - PATH=self.content_path, - STATIC_PATHS=[''],) - context = get_context(settings) - - StaticGenerator( - context=context, settings=settings, - path=settings['PATH'], output_path=self.temp_output, - theme=settings['THEME']).generate_context() - - staticnames = [os.path.basename(c.source_path) - for c in context['staticfiles']] - - self.assertNotIn( - 'subdir_fake_image.jpg', staticnames, - "StaticGenerator processed a file in a STATIC_EXCLUDES directory") - self.assertIn( - 'fake_image.jpg', staticnames, - "StaticGenerator skipped a file that it should have included") - - def test_static_exclude_sources(self): - """Test that StaticGenerator respects STATIC_EXCLUDE_SOURCES. - """ - - settings = get_settings( - STATIC_EXCLUDE_SOURCES=True, - PATH=self.content_path, - PAGE_PATHS=[''], - STATIC_PATHS=[''], - CACHE_CONTENT=False,) - context = get_context(settings) - - for generator_class in (PagesGenerator, StaticGenerator): - generator_class( - context=context, settings=settings, - path=settings['PATH'], output_path=self.temp_output, - theme=settings['THEME']).generate_context() - - staticnames = [os.path.basename(c.source_path) - for c in context['staticfiles']] - - self.assertFalse( - any(name.endswith(".md") for name in staticnames), - "STATIC_EXCLUDE_SOURCES=True failed to exclude a markdown file") - - settings.update(STATIC_EXCLUDE_SOURCES=False) - context = get_context(settings) - - for generator_class in (PagesGenerator, StaticGenerator): - generator_class( - context=context, settings=settings, - path=settings['PATH'], output_path=self.temp_output, - theme=settings['THEME']).generate_context() - - staticnames = [os.path.basename(c.source_path) - for c in context['staticfiles']] - - self.assertTrue( - any(name.endswith(".md") for name in staticnames), - "STATIC_EXCLUDE_SOURCES=False failed to include a markdown file") - - def test_static_links(self): - """Test that StaticGenerator uses files in static_links - """ - settings = get_settings( - STATIC_EXCLUDES=['subdir'], - PATH=self.content_path, - STATIC_PATHS=[],) - context = get_context(settings) - context['static_links'] |= {'short_page.md', 'subdir_fake_image.jpg'} - - StaticGenerator( - context=context, settings=settings, - path=settings['PATH'], output_path=self.temp_output, - theme=settings['THEME']).generate_context() - - staticfiles_names = [ - os.path.basename(c.source_path) for c in context['staticfiles']] - - static_content_names = [ - os.path.basename(c) for c in context['static_content']] - - self.assertIn( - 'short_page.md', staticfiles_names, - "StaticGenerator skipped a file that it should have included") - self.assertIn( - 'short_page.md', static_content_names, - "StaticGenerator skipped a file that it should have included") - self.assertIn( - 'subdir_fake_image.jpg', staticfiles_names, - "StaticGenerator skipped a file that it should have included") - self.assertIn( - 'subdir_fake_image.jpg', static_content_names, - "StaticGenerator skipped a file that it should have included") - - def test_copy_one_file(self): - with open(self.startfile, "w") as f: - f.write("staticcontent") - self.generator.generate_context() - self.generator.generate_output(None) - with open(self.endfile) as f: - self.assertEqual(f.read(), "staticcontent") - - def test_file_update_required_when_dest_does_not_exist(self): - staticfile = MagicMock() - staticfile.source_path = self.startfile - staticfile.save_as = self.endfile - with open(staticfile.source_path, "w") as f: - f.write("a") - update_required = self.generator._file_update_required(staticfile) - self.assertTrue(update_required) - - def test_dest_and_source_mtimes_are_equal(self): - staticfile = MagicMock() - staticfile.source_path = self.startfile - staticfile.save_as = self.endfile - self.settings['STATIC_CHECK_IF_MODIFIED'] = True - with open(staticfile.source_path, "w") as f: - f.write("a") - os.mkdir(os.path.join(self.temp_output, "static")) - copy(staticfile.source_path, staticfile.save_as) - isnewer = self.generator._source_is_newer(staticfile) - self.assertFalse(isnewer) - - def test_source_is_newer(self): - staticfile = MagicMock() - staticfile.source_path = self.startfile - staticfile.save_as = self.endfile - with open(staticfile.source_path, "w") as f: - f.write("a") - os.mkdir(os.path.join(self.temp_output, "static")) - copy(staticfile.source_path, staticfile.save_as) - self.set_ancient_mtime(staticfile.save_as) - isnewer = self.generator._source_is_newer(staticfile) - self.assertTrue(isnewer) - - def test_skip_file_when_source_is_not_newer(self): - self.settings['STATIC_CHECK_IF_MODIFIED'] = True - with open(self.startfile, "w") as f: - f.write("staticcontent") - os.mkdir(os.path.join(self.temp_output, "static")) - with open(self.endfile, "w") as f: - f.write("staticcontent") - expected = os.path.getmtime(self.endfile) - self.set_ancient_mtime(self.startfile) - self.generator.generate_context() - self.generator.generate_output(None) - self.assertEqual(os.path.getmtime(self.endfile), expected) - - def test_dont_link_by_default(self): - with open(self.startfile, "w") as f: - f.write("staticcontent") - self.generator.generate_context() - self.generator.generate_output(None) - self.assertFalse(os.path.samefile(self.startfile, self.endfile)) - - def test_output_file_is_linked_to_source(self): - self.settings['STATIC_CREATE_LINKS'] = True - with open(self.startfile, "w") as f: - f.write("staticcontent") - self.generator.generate_context() - self.generator.generate_output(None) - self.assertTrue(os.path.samefile(self.startfile, self.endfile)) - - def test_output_file_exists_and_is_newer(self): - self.settings['STATIC_CREATE_LINKS'] = True - with open(self.startfile, "w") as f: - f.write("staticcontent") - os.mkdir(os.path.join(self.temp_output, "static")) - with open(self.endfile, "w") as f: - f.write("othercontent") - self.generator.generate_context() - self.generator.generate_output(None) - self.assertTrue(os.path.samefile(self.startfile, self.endfile)) - - @unittest.skipUnless(can_symlink(), 'No symlink privilege') - def test_can_symlink_when_hardlink_not_possible(self): - self.settings['STATIC_CREATE_LINKS'] = True - with open(self.startfile, "w") as f: - f.write("staticcontent") - os.mkdir(os.path.join(self.temp_output, "static")) - self.generator.fallback_to_symlinks = True - self.generator.generate_context() - self.generator.generate_output(None) - self.assertTrue(os.path.islink(self.endfile)) - - @unittest.skipUnless(can_symlink(), 'No symlink privilege') - def test_existing_symlink_is_considered_up_to_date(self): - self.settings['STATIC_CREATE_LINKS'] = True - with open(self.startfile, "w") as f: - f.write("staticcontent") - os.mkdir(os.path.join(self.temp_output, "static")) - os.symlink(self.startfile, self.endfile) - staticfile = MagicMock() - staticfile.source_path = self.startfile - staticfile.save_as = self.endfile - requires_update = self.generator._file_update_required(staticfile) - self.assertFalse(requires_update) - - @unittest.skipUnless(can_symlink(), 'No symlink privilege') - def test_invalid_symlink_is_overwritten(self): - self.settings['STATIC_CREATE_LINKS'] = True - with open(self.startfile, "w") as f: - f.write("staticcontent") - os.mkdir(os.path.join(self.temp_output, "static")) - os.symlink("invalid", self.endfile) - staticfile = MagicMock() - staticfile.source_path = self.startfile - staticfile.save_as = self.endfile - requires_update = self.generator._file_update_required(staticfile) - self.assertTrue(requires_update) - self.generator.fallback_to_symlinks = True - self.generator.generate_context() - self.generator.generate_output(None) - self.assertTrue(os.path.islink(self.endfile)) - - # os.path.realpath is broken on Windows before python3.8 for symlinks. - # This is a (ugly) workaround. - # see: https://bugs.python.org/issue9949 - if os.name == 'nt' and sys.version_info < (3, 8): - def get_real_path(path): - return os.readlink(path) if os.path.islink(path) else path - else: - get_real_path = os.path.realpath - - self.assertEqual(get_real_path(self.endfile), - get_real_path(self.startfile)) - - def test_delete_existing_file_before_mkdir(self): - with open(self.startfile, "w") as f: - f.write("staticcontent") - with open(os.path.join(self.temp_output, "static"), "w") as f: - f.write("This file should be a directory") - self.generator.generate_context() - self.generator.generate_output(None) - self.assertTrue( - os.path.isdir(os.path.join(self.temp_output, "static"))) - self.assertTrue(os.path.isfile(self.endfile)) - - -class TestJinja2Environment(unittest.TestCase): - - def setUp(self): - self.temp_content = mkdtemp(prefix='pelicantests.') - self.temp_output = mkdtemp(prefix='pelicantests.') - self.old_locale = locale.setlocale(locale.LC_ALL) - locale.setlocale(locale.LC_ALL, 'C') - - def tearDown(self): - rmtree(self.temp_content) - rmtree(self.temp_output) - locale.setlocale(locale.LC_ALL, self.old_locale) - - def _test_jinja2_helper(self, additional_settings, content, expected): - settings = get_settings() - settings['STATIC_PATHS'] = ['static'] - settings['TEMPLATE_PAGES'] = { - 'template/source.html': 'generated/file.html' - } - settings.update(additional_settings) - - generator = TemplatePagesGenerator( - context={'foo': 'foo', 'bar': 'bar'}, settings=settings, - path=self.temp_content, theme='', output_path=self.temp_output) - - # create a dummy template file - template_dir = os.path.join(self.temp_content, 'template') - template_path = os.path.join(template_dir, 'source.html') - os.makedirs(template_dir) - with open(template_path, 'w') as template_file: - template_file.write(content) - - writer = Writer(self.temp_output, settings=settings) - generator.generate_output(writer) - - output_path = os.path.join(self.temp_output, 'generated', 'file.html') - - # output file has been generated - self.assertTrue(os.path.exists(output_path)) - - # output content is correct - with open(output_path) as output_file: - self.assertEqual(output_file.read(), expected) - - def test_jinja2_filter(self): - """JINJA_FILTERS adds custom filters to Jinja2 environment""" - content = 'foo: {{ foo|custom_filter }}, bar: {{ bar|custom_filter }}' - settings = {'JINJA_FILTERS': {'custom_filter': lambda x: x.upper()}} - expected = 'foo: FOO, bar: BAR' - - self._test_jinja2_helper(settings, content, expected) - - def test_jinja2_test(self): - """JINJA_TESTS adds custom tests to Jinja2 environment""" - content = 'foo {{ foo is custom_test }}, bar {{ bar is custom_test }}' - settings = {'JINJA_TESTS': {'custom_test': lambda x: x == 'bar'}} - expected = 'foo False, bar True' - - self._test_jinja2_helper(settings, content, expected) - - def test_jinja2_global(self): - """JINJA_GLOBALS adds custom globals to Jinja2 environment""" - content = '{{ custom_global }}' - settings = {'JINJA_GLOBALS': {'custom_global': 'foobar'}} - expected = 'foobar' - - self._test_jinja2_helper(settings, content, expected) - - def test_jinja2_extension(self): - """JINJA_ENVIRONMENT adds extensions to Jinja2 environment""" - content = '{% set stuff = [] %}{% do stuff.append(1) %}{{ stuff }}' - settings = {'JINJA_ENVIRONMENT': {'extensions': ['jinja2.ext.do']}} - expected = '[1]' - - self._test_jinja2_helper(settings, content, expected) diff --git a/pelican/tests/test_importer.py b/pelican/tests/test_importer.py deleted file mode 100644 index 76feb9ce..00000000 --- a/pelican/tests/test_importer.py +++ /dev/null @@ -1,453 +0,0 @@ -import locale -import os -import re -from posixpath import join as posix_join - -from pelican.settings import DEFAULT_CONFIG -from pelican.tests.support import (mute, skipIfNoExecutable, temporary_folder, - unittest) -from pelican.tools.pelican_import import (blogger2fields, build_header, - build_markdown_header, - decode_wp_content, - download_attachments, fields2pelican, - get_attachments, wp2fields) -from pelican.utils import path_to_file_url, slugify - -CUR_DIR = os.path.abspath(os.path.dirname(__file__)) -BLOGGER_XML_SAMPLE = os.path.join(CUR_DIR, 'content', 'bloggerexport.xml') -WORDPRESS_XML_SAMPLE = os.path.join(CUR_DIR, 'content', 'wordpressexport.xml') -WORDPRESS_ENCODED_CONTENT_SAMPLE = os.path.join(CUR_DIR, - 'content', - 'wordpress_content_encoded') -WORDPRESS_DECODED_CONTENT_SAMPLE = os.path.join(CUR_DIR, - 'content', - 'wordpress_content_decoded') - -try: - from bs4 import BeautifulSoup -except ImportError: - BeautifulSoup = False # NOQA - -try: - import bs4.builder._lxml as LXML -except ImportError: - LXML = False - - -@skipIfNoExecutable(['pandoc', '--version']) -@unittest.skipUnless(BeautifulSoup, 'Needs BeautifulSoup module') -class TestBloggerXmlImporter(unittest.TestCase): - - def setUp(self): - self.old_locale = locale.setlocale(locale.LC_ALL) - locale.setlocale(locale.LC_ALL, 'C') - self.posts = blogger2fields(BLOGGER_XML_SAMPLE) - - def tearDown(self): - locale.setlocale(locale.LC_ALL, self.old_locale) - - def test_recognise_kind_and_title(self): - """Check that importer only outputs pages, articles and comments, - that these are correctly identified and that titles are correct. - """ - test_posts = list(self.posts) - kinds = {x[8] for x in test_posts} - self.assertEqual({'page', 'article', 'comment'}, kinds) - page_titles = {x[0] for x in test_posts if x[8] == 'page'} - self.assertEqual({'Test page', 'Test page 2'}, page_titles) - article_titles = {x[0] for x in test_posts if x[8] == 'article'} - self.assertEqual({'Black as Egypt\'s Night', 'The Steel Windpipe'}, - article_titles) - comment_titles = {x[0] for x in test_posts if x[8] == 'comment'} - self.assertEqual({'Mishka, always a pleasure to read your ' - 'adventures!...'}, - comment_titles) - - def test_recognise_status_with_correct_filename(self): - """Check that importerer outputs only statuses 'published' and 'draft', - that these are correctly identified and that filenames are correct. - """ - test_posts = list(self.posts) - statuses = {x[7] for x in test_posts} - self.assertEqual({'published', 'draft'}, statuses) - - draft_filenames = {x[2] for x in test_posts if x[7] == 'draft'} - # draft filenames are id-based - self.assertEqual({'page-4386962582497458967', - 'post-1276418104709695660'}, draft_filenames) - - published_filenames = {x[2] for x in test_posts if x[7] == 'published'} - # published filenames are url-based, except comments - self.assertEqual({'the-steel-windpipe', - 'test-page', - 'post-5590533389087749201'}, published_filenames) - - -@skipIfNoExecutable(['pandoc', '--version']) -@unittest.skipUnless(BeautifulSoup, 'Needs BeautifulSoup module') -class TestWordpressXmlImporter(unittest.TestCase): - - def setUp(self): - self.old_locale = locale.setlocale(locale.LC_ALL) - locale.setlocale(locale.LC_ALL, 'C') - self.posts = wp2fields(WORDPRESS_XML_SAMPLE) - self.custposts = wp2fields(WORDPRESS_XML_SAMPLE, True) - - def tearDown(self): - locale.setlocale(locale.LC_ALL, self.old_locale) - - def test_ignore_empty_posts(self): - self.assertTrue(self.posts) - for (title, content, fname, date, author, - categ, tags, status, kind, format) in self.posts: - self.assertTrue(title.strip()) - - def test_recognise_page_kind(self): - """ Check that we recognise pages in wordpress, as opposed to posts """ - self.assertTrue(self.posts) - # Collect (title, filename, kind) of non-empty posts recognised as page - pages_data = [] - for (title, content, fname, date, author, - categ, tags, status, kind, format) in self.posts: - if kind == 'page': - pages_data.append((title, fname)) - self.assertEqual(2, len(pages_data)) - self.assertEqual(('Page', 'contact'), pages_data[0]) - self.assertEqual(('Empty Page', 'empty'), pages_data[1]) - - def test_dirpage_directive_for_page_kind(self): - silent_f2p = mute(True)(fields2pelican) - test_post = filter(lambda p: p[0].startswith("Empty Page"), self.posts) - with temporary_folder() as temp: - fname = list(silent_f2p(test_post, 'markdown', - temp, dirpage=True))[0] - self.assertTrue(fname.endswith('pages%sempty.md' % os.path.sep)) - - def test_dircat(self): - silent_f2p = mute(True)(fields2pelican) - test_posts = [] - for post in self.posts: - # check post kind - if len(post[5]) > 0: # Has a category - test_posts.append(post) - with temporary_folder() as temp: - fnames = list(silent_f2p(test_posts, 'markdown', - temp, dircat=True)) - subs = DEFAULT_CONFIG['SLUG_REGEX_SUBSTITUTIONS'] - index = 0 - for post in test_posts: - name = post[2] - category = slugify(post[5][0], regex_subs=subs, preserve_case=True) - name += '.md' - filename = os.path.join(category, name) - out_name = fnames[index] - self.assertTrue(out_name.endswith(filename)) - index += 1 - - def test_unless_custom_post_all_items_should_be_pages_or_posts(self): - self.assertTrue(self.posts) - pages_data = [] - for (title, content, fname, date, author, categ, - tags, status, kind, format) in self.posts: - if kind == 'page' or kind == 'article': - pass - else: - pages_data.append((title, fname)) - self.assertEqual(0, len(pages_data)) - - def test_recognise_custom_post_type(self): - self.assertTrue(self.custposts) - cust_data = [] - for (title, content, fname, date, author, categ, - tags, status, kind, format) in self.custposts: - if kind == 'article' or kind == 'page': - pass - else: - cust_data.append((title, kind)) - self.assertEqual(3, len(cust_data)) - self.assertEqual( - ('A custom post in category 4', 'custom1'), - cust_data[0]) - self.assertEqual( - ('A custom post in category 5', 'custom1'), - cust_data[1]) - self.assertEqual( - ('A 2nd custom post type also in category 5', 'custom2'), - cust_data[2]) - - def test_custom_posts_put_in_own_dir(self): - silent_f2p = mute(True)(fields2pelican) - test_posts = [] - for post in self.custposts: - # check post kind - if post[8] == 'article' or post[8] == 'page': - pass - else: - test_posts.append(post) - with temporary_folder() as temp: - fnames = list(silent_f2p(test_posts, 'markdown', - temp, wp_custpost=True)) - index = 0 - for post in test_posts: - name = post[2] - kind = post[8] - name += '.md' - filename = os.path.join(kind, name) - out_name = fnames[index] - self.assertTrue(out_name.endswith(filename)) - index += 1 - - def test_custom_posts_put_in_own_dir_and_catagory_sub_dir(self): - silent_f2p = mute(True)(fields2pelican) - test_posts = [] - for post in self.custposts: - # check post kind - if post[8] == 'article' or post[8] == 'page': - pass - else: - test_posts.append(post) - with temporary_folder() as temp: - fnames = list(silent_f2p(test_posts, 'markdown', temp, - wp_custpost=True, dircat=True)) - subs = DEFAULT_CONFIG['SLUG_REGEX_SUBSTITUTIONS'] - index = 0 - for post in test_posts: - name = post[2] - kind = post[8] - category = slugify(post[5][0], regex_subs=subs, preserve_case=True) - name += '.md' - filename = os.path.join(kind, category, name) - out_name = fnames[index] - self.assertTrue(out_name.endswith(filename)) - index += 1 - - def test_wp_custpost_true_dirpage_false(self): - # pages should only be put in their own directory when dirpage = True - silent_f2p = mute(True)(fields2pelican) - test_posts = [] - for post in self.custposts: - # check post kind - if post[8] == 'page': - test_posts.append(post) - with temporary_folder() as temp: - fnames = list(silent_f2p(test_posts, 'markdown', temp, - wp_custpost=True, dirpage=False)) - index = 0 - for post in test_posts: - name = post[2] - name += '.md' - filename = os.path.join('pages', name) - out_name = fnames[index] - self.assertFalse(out_name.endswith(filename)) - - def test_can_toggle_raw_html_code_parsing(self): - test_posts = list(self.posts) - - def r(f): - with open(f, encoding='utf-8') as infile: - return infile.read() - silent_f2p = mute(True)(fields2pelican) - - with temporary_folder() as temp: - - rst_files = (r(f) for f - in silent_f2p(test_posts, 'markdown', temp)) - self.assertTrue(any(' entities in " - "the title. You can't miss them.") - self.assertNotIn('&', title) - - def test_decode_wp_content_returns_empty(self): - """ Check that given an empty string we return an empty string.""" - self.assertEqual(decode_wp_content(""), "") - - def test_decode_wp_content(self): - """ Check that we can decode a wordpress content string.""" - with open(WORDPRESS_ENCODED_CONTENT_SAMPLE) as encoded_file: - encoded_content = encoded_file.read() - with open(WORDPRESS_DECODED_CONTENT_SAMPLE) as decoded_file: - decoded_content = decoded_file.read() - self.assertEqual( - decode_wp_content(encoded_content, br=False), - decoded_content) - - def test_preserve_verbatim_formatting(self): - def r(f): - with open(f, encoding='utf-8') as infile: - return infile.read() - silent_f2p = mute(True)(fields2pelican) - test_post = filter( - lambda p: p[0].startswith("Code in List"), - self.posts) - with temporary_folder() as temp: - md = [r(f) for f in silent_f2p(test_post, 'markdown', temp)][0] - self.assertTrue(re.search(r'\s+a = \[1, 2, 3\]', md)) - self.assertTrue(re.search(r'\s+b = \[4, 5, 6\]', md)) - - for_line = re.search(r'\s+for i in zip\(a, b\):', md).group(0) - print_line = re.search(r'\s+print i', md).group(0) - self.assertTrue( - for_line.rindex('for') < print_line.rindex('print')) - - def test_code_in_list(self): - def r(f): - with open(f, encoding='utf-8') as infile: - return infile.read() - silent_f2p = mute(True)(fields2pelican) - test_post = filter( - lambda p: p[0].startswith("Code in List"), - self.posts) - with temporary_folder() as temp: - md = [r(f) for f in silent_f2p(test_post, 'markdown', temp)][0] - sample_line = re.search(r'- This is a code sample', md).group(0) - code_line = re.search(r'\s+a = \[1, 2, 3\]', md).group(0) - self.assertTrue(sample_line.rindex('This') < code_line.rindex('a')) - - def test_dont_use_smart_quotes(self): - def r(f): - with open(f, encoding='utf-8') as infile: - return infile.read() - silent_f2p = mute(True)(fields2pelican) - test_post = filter( - lambda p: p[0].startswith("Post with raw data"), - self.posts) - with temporary_folder() as temp: - md = [r(f) for f in silent_f2p(test_post, 'markdown', temp)][0] - escaped_quotes = re.search(r'\\[\'"“”‘’]', md) - self.assertFalse(escaped_quotes) - - -class TestBuildHeader(unittest.TestCase): - def test_build_header(self): - header = build_header('test', None, None, None, None, None) - self.assertEqual(header, 'test\n####\n\n') - - def test_build_header_with_fields(self): - header_data = [ - 'Test Post', - '2014-11-04', - 'Alexis Métaireau', - ['Programming'], - ['Pelican', 'Python'], - 'test-post', - ] - - expected_docutils = '\n'.join([ - 'Test Post', - '#########', - ':date: 2014-11-04', - ':author: Alexis Métaireau', - ':category: Programming', - ':tags: Pelican, Python', - ':slug: test-post', - '\n', - ]) - - expected_md = '\n'.join([ - 'Title: Test Post', - 'Date: 2014-11-04', - 'Author: Alexis Métaireau', - 'Category: Programming', - 'Tags: Pelican, Python', - 'Slug: test-post', - '\n', - ]) - - self.assertEqual(build_header(*header_data), expected_docutils) - self.assertEqual(build_markdown_header(*header_data), expected_md) - - def test_build_header_with_east_asian_characters(self): - header = build_header('これは広い幅の文字だけで構成されたタイトルです', - None, None, None, None, None) - - self.assertEqual(header, - ('これは広い幅の文字だけで構成されたタイトルです\n' - '##############################################' - '\n\n')) - - def test_galleries_added_to_header(self): - header = build_header('test', None, None, None, None, None, - attachments=['output/test1', 'output/test2']) - self.assertEqual(header, ('test\n####\n' - ':attachments: output/test1, ' - 'output/test2\n\n')) - - def test_galleries_added_to_markdown_header(self): - header = build_markdown_header('test', None, None, None, None, None, - attachments=['output/test1', - 'output/test2']) - self.assertEqual( - header, - 'Title: test\nAttachments: output/test1, output/test2\n\n') - - -@unittest.skipUnless(BeautifulSoup, 'Needs BeautifulSoup module') -@unittest.skipUnless(LXML, 'Needs lxml module') -class TestWordpressXMLAttachements(unittest.TestCase): - def setUp(self): - self.old_locale = locale.setlocale(locale.LC_ALL) - locale.setlocale(locale.LC_ALL, 'C') - self.attachments = get_attachments(WORDPRESS_XML_SAMPLE) - - def tearDown(self): - locale.setlocale(locale.LC_ALL, self.old_locale) - - def test_recognise_attachments(self): - self.assertTrue(self.attachments) - self.assertTrue(len(self.attachments.keys()) == 3) - - def test_attachments_associated_with_correct_post(self): - self.assertTrue(self.attachments) - for post in self.attachments.keys(): - if post is None: - expected = { - ('https://upload.wikimedia.org/wikipedia/commons/' - 'thumb/2/2c/Pelican_lakes_entrance02.jpg/' - '240px-Pelican_lakes_entrance02.jpg') - } - self.assertEqual(self.attachments[post], expected) - elif post == 'with-excerpt': - expected_invalid = ('http://thisurlisinvalid.notarealdomain/' - 'not_an_image.jpg') - expected_pelikan = ('http://en.wikipedia.org/wiki/' - 'File:Pelikan_Walvis_Bay.jpg') - self.assertEqual(self.attachments[post], - {expected_invalid, expected_pelikan}) - elif post == 'with-tags': - expected_invalid = ('http://thisurlisinvalid.notarealdomain') - self.assertEqual(self.attachments[post], {expected_invalid}) - else: - self.fail('all attachments should match to a ' - 'filename or None, {}' - .format(post)) - - def test_download_attachments(self): - real_file = os.path.join(CUR_DIR, 'content/article.rst') - good_url = path_to_file_url(real_file) - bad_url = 'http://localhost:1/not_a_file.txt' - silent_da = mute()(download_attachments) - with temporary_folder() as temp: - locations = list(silent_da(temp, [good_url, bad_url])) - self.assertEqual(1, len(locations)) - directory = locations[0] - self.assertTrue( - directory.endswith(posix_join('content', 'article.rst')), - directory) diff --git a/pelican/tests/test_log.py b/pelican/tests/test_log.py deleted file mode 100644 index 3f9d7250..00000000 --- a/pelican/tests/test_log.py +++ /dev/null @@ -1,132 +0,0 @@ -import logging -import unittest -from collections import defaultdict -from contextlib import contextmanager - -from pelican import log -from pelican.tests.support import LogCountHandler - - -class TestLog(unittest.TestCase): - def setUp(self): - super().setUp() - self.logger = logging.getLogger(__name__) - self.handler = LogCountHandler() - self.handler.setFormatter(log.get_formatter()) - self.logger.addHandler(self.handler) - - def tearDown(self): - self._reset_limit_filter() - self.logger.removeHandler(self.handler) - super().tearDown() - - def _reset_limit_filter(self): - log.LimitFilter._ignore = set() - log.LimitFilter._raised_messages = set() - log.LimitFilter._threshold = 5 - log.LimitFilter._group_count = defaultdict(int) - - @contextmanager - def reset_logger(self): - try: - yield None - finally: - self._reset_limit_filter() - self.handler.flush() - - def test_log_formatter(self): - counter = self.handler.count_formatted_logs - with self.reset_logger(): - # log simple case - self.logger.warning('Log %s', 'test') - self.assertEqual( - counter('Log test', logging.WARNING), - 1) - - with self.reset_logger(): - # log multiline message - self.logger.warning('Log\n%s', 'test') - # Log - # | test - self.assertEqual( - counter('Log', logging.WARNING), - 1) - self.assertEqual( - counter(' | test', logging.WARNING), - 1) - - with self.reset_logger(): - # log multiline argument - self.logger.warning('Log %s', 'test1\ntest2') - # Log test1 - # | test2 - self.assertEqual( - counter('Log test1', logging.WARNING), - 1) - self.assertEqual( - counter(' | test2', logging.WARNING), - 1) - - with self.reset_logger(): - # log single list - self.logger.warning('Log %s', ['foo', 'bar']) - self.assertEqual( - counter(r"Log \['foo', 'bar'\]", logging.WARNING), - 1) - - with self.reset_logger(): - # log single dict - self.logger.warning('Log %s', {'foo': 1, 'bar': 2}) - self.assertEqual( - # dict order is not guaranteed - counter(r"Log {'.*': \d, '.*': \d}", logging.WARNING), - 1) - - def test_log_filter(self): - def do_logging(): - for i in range(5): - self.logger.warning('Log %s', i) - self.logger.warning('Another log %s', i) - # no filter - with self.reset_logger(): - do_logging() - self.assertEqual( - self.handler.count_logs('Log \\d', logging.WARNING), - 5) - self.assertEqual( - self.handler.count_logs('Another log \\d', logging.WARNING), - 5) - - # filter by template - with self.reset_logger(): - log.LimitFilter._ignore.add((logging.WARNING, 'Log %s')) - do_logging() - self.assertEqual( - self.handler.count_logs('Log \\d', logging.WARNING), - 0) - self.assertEqual( - self.handler.count_logs('Another log \\d', logging.WARNING), - 5) - - # filter by exact message - with self.reset_logger(): - log.LimitFilter._ignore.add((logging.WARNING, 'Log 3')) - do_logging() - self.assertEqual( - self.handler.count_logs('Log \\d', logging.WARNING), - 4) - self.assertEqual( - self.handler.count_logs('Another log \\d', logging.WARNING), - 5) - - # filter by both - with self.reset_logger(): - log.LimitFilter._ignore.add((logging.WARNING, 'Log 3')) - log.LimitFilter._ignore.add((logging.WARNING, 'Another log %s')) - do_logging() - self.assertEqual( - self.handler.count_logs('Log \\d', logging.WARNING), - 4) - self.assertEqual( - self.handler.count_logs('Another log \\d', logging.WARNING), - 0) diff --git a/pelican/tests/test_paginator.py b/pelican/tests/test_paginator.py deleted file mode 100644 index f8233eb4..00000000 --- a/pelican/tests/test_paginator.py +++ /dev/null @@ -1,104 +0,0 @@ -import locale - -from jinja2.utils import generate_lorem_ipsum - -from pelican.contents import Article, Author -from pelican.paginator import Paginator -from pelican.settings import DEFAULT_CONFIG -from pelican.tests.support import get_settings, unittest - - -# generate one paragraph, enclosed with

    -TEST_CONTENT = str(generate_lorem_ipsum(n=1)) -TEST_SUMMARY = generate_lorem_ipsum(n=1, html=False) - - -class TestPage(unittest.TestCase): - def setUp(self): - super().setUp() - self.old_locale = locale.setlocale(locale.LC_ALL) - locale.setlocale(locale.LC_ALL, 'C') - self.page_kwargs = { - 'content': TEST_CONTENT, - 'context': { - 'localsiteurl': '', - }, - 'metadata': { - 'summary': TEST_SUMMARY, - 'title': 'foo bar', - }, - 'source_path': '/path/to/file/foo.ext' - } - - def tearDown(self): - locale.setlocale(locale.LC_ALL, self.old_locale) - - def test_save_as_preservation(self): - settings = get_settings() - # fix up pagination rules - from pelican.paginator import PaginationRule - pagination_rules = [ - PaginationRule(*r) for r in settings.get( - 'PAGINATION_PATTERNS', - DEFAULT_CONFIG['PAGINATION_PATTERNS'], - ) - ] - settings['PAGINATION_PATTERNS'] = sorted( - pagination_rules, - key=lambda r: r[0], - ) - - self.page_kwargs['metadata']['author'] = Author('Blogger', settings) - object_list = [Article(**self.page_kwargs), - Article(**self.page_kwargs)] - paginator = Paginator('foobar.foo', 'foobar/foo', object_list, - settings) - page = paginator.page(1) - self.assertEqual(page.save_as, 'foobar.foo') - - def test_custom_pagination_pattern(self): - from pelican.paginator import PaginationRule - settings = get_settings() - settings['PAGINATION_PATTERNS'] = [PaginationRule(*r) for r in [ - (1, '/{url}', '{base_name}/index.html'), - (2, '/{url}{number}/', '{base_name}/{number}/index.html') - ]] - - self.page_kwargs['metadata']['author'] = Author('Blogger', settings) - object_list = [Article(**self.page_kwargs), - Article(**self.page_kwargs)] - paginator = Paginator('blog/index.html', '//blog.my.site/', - object_list, settings, 1) - # The URL *has to* stay absolute (with // in the front), so verify that - page1 = paginator.page(1) - self.assertEqual(page1.save_as, 'blog/index.html') - self.assertEqual(page1.url, '//blog.my.site/') - page2 = paginator.page(2) - self.assertEqual(page2.save_as, 'blog/2/index.html') - self.assertEqual(page2.url, '//blog.my.site/2/') - - def test_custom_pagination_pattern_last_page(self): - from pelican.paginator import PaginationRule - settings = get_settings() - settings['PAGINATION_PATTERNS'] = [PaginationRule(*r) for r in [ - (1, '/{url}1/', '{base_name}/1/index.html'), - (2, '/{url}{number}/', '{base_name}/{number}/index.html'), - (-1, '/{url}', '{base_name}/index.html'), - ]] - - self.page_kwargs['metadata']['author'] = Author('Blogger', settings) - object_list = [Article(**self.page_kwargs), - Article(**self.page_kwargs), - Article(**self.page_kwargs)] - paginator = Paginator('blog/index.html', '//blog.my.site/', - object_list, settings, 1) - # The URL *has to* stay absolute (with // in the front), so verify that - page1 = paginator.page(1) - self.assertEqual(page1.save_as, 'blog/1/index.html') - self.assertEqual(page1.url, '//blog.my.site/1/') - page2 = paginator.page(2) - self.assertEqual(page2.save_as, 'blog/2/index.html') - self.assertEqual(page2.url, '//blog.my.site/2/') - page3 = paginator.page(3) - self.assertEqual(page3.save_as, 'blog/index.html') - self.assertEqual(page3.url, '//blog.my.site/') diff --git a/pelican/tests/test_pelican.py b/pelican/tests/test_pelican.py deleted file mode 100644 index cacc65c1..00000000 --- a/pelican/tests/test_pelican.py +++ /dev/null @@ -1,267 +0,0 @@ -import locale -import logging -import os -import subprocess -import sys -from collections.abc import Sequence -from shutil import rmtree -from tempfile import mkdtemp - -from pelican import Pelican -from pelican.generators import StaticGenerator -from pelican.settings import read_settings -from pelican.tests.support import (LoggedTestCase, locale_available, - mute, unittest) - -CURRENT_DIR = os.path.dirname(os.path.abspath(__file__)) -SAMPLES_PATH = os.path.abspath(os.path.join( - CURRENT_DIR, os.pardir, os.pardir, 'samples')) -OUTPUT_PATH = os.path.abspath(os.path.join(CURRENT_DIR, 'output')) - -INPUT_PATH = os.path.join(SAMPLES_PATH, "content") -SAMPLE_CONFIG = os.path.join(SAMPLES_PATH, "pelican.conf.py") -SAMPLE_FR_CONFIG = os.path.join(SAMPLES_PATH, "pelican.conf_FR.py") - - -def recursiveDiff(dcmp): - diff = { - 'diff_files': [os.path.join(dcmp.right, f) for f in dcmp.diff_files], - 'left_only': [os.path.join(dcmp.right, f) for f in dcmp.left_only], - 'right_only': [os.path.join(dcmp.right, f) for f in dcmp.right_only], - } - for sub_dcmp in dcmp.subdirs.values(): - for k, v in recursiveDiff(sub_dcmp).items(): - diff[k] += v - return diff - - -class TestPelican(LoggedTestCase): - # general functional testing for pelican. Basically, this test case tries - # to run pelican in different situations and see how it behaves - - def setUp(self): - super().setUp() - self.temp_path = mkdtemp(prefix='pelicantests.') - self.temp_cache = mkdtemp(prefix='pelican_cache.') - self.maxDiff = None - self.old_locale = locale.setlocale(locale.LC_ALL) - locale.setlocale(locale.LC_ALL, 'C') - - def tearDown(self): - read_settings() # cleanup PYGMENTS_RST_OPTIONS - rmtree(self.temp_path) - rmtree(self.temp_cache) - locale.setlocale(locale.LC_ALL, self.old_locale) - super().tearDown() - - def assertDirsEqual(self, left_path, right_path): - out, err = subprocess.Popen( - ['git', 'diff', '--no-ext-diff', '--exit-code', - '-w', left_path, right_path], - env={'PAGER': ''}, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE - ).communicate() - - def ignorable_git_crlf_errors(line): - # Work around for running tests on Windows - for msg in [ - "LF will be replaced by CRLF", - "CRLF will be replaced by LF", - "The file will have its original line endings"]: - if msg in line: - return True - return False - if err: - err = '\n'.join([line for line in err.decode('utf8').splitlines() - if not ignorable_git_crlf_errors(line)]) - assert not out, out - assert not err, err - - def test_order_of_generators(self): - # StaticGenerator must run last, so it can identify files that - # were skipped by the other generators, and so static files can - # have their output paths overridden by the {attach} link syntax. - - pelican = Pelican(settings=read_settings(path=None)) - generator_classes = pelican._get_generator_classes() - - self.assertTrue( - generator_classes[-1] is StaticGenerator, - "StaticGenerator must be the last generator, but it isn't!") - self.assertIsInstance( - generator_classes, Sequence, - "_get_generator_classes() must return a Sequence to preserve order") - - def test_basic_generation_works(self): - # when running pelican without settings, it should pick up the default - # ones and generate correct output without raising any exception - settings = read_settings(path=None, override={ - 'PATH': INPUT_PATH, - 'OUTPUT_PATH': self.temp_path, - 'CACHE_PATH': self.temp_cache, - 'LOCALE': locale.normalize('en_US'), - }) - pelican = Pelican(settings=settings) - mute(True)(pelican.run)() - self.assertDirsEqual( - self.temp_path, os.path.join(OUTPUT_PATH, 'basic')) - self.assertLogCountEqual( - count=1, - msg="Unable to find.*skipping url replacement", - level=logging.WARNING) - - def test_custom_generation_works(self): - # the same thing with a specified set of settings should work - settings = read_settings(path=SAMPLE_CONFIG, override={ - 'PATH': INPUT_PATH, - 'OUTPUT_PATH': self.temp_path, - 'CACHE_PATH': self.temp_cache, - 'LOCALE': locale.normalize('en_US.UTF-8'), - }) - pelican = Pelican(settings=settings) - mute(True)(pelican.run)() - self.assertDirsEqual( - self.temp_path, os.path.join(OUTPUT_PATH, 'custom')) - - @unittest.skipUnless(locale_available('fr_FR.UTF-8') or - locale_available('French'), 'French locale needed') - def test_custom_locale_generation_works(self): - '''Test that generation with fr_FR.UTF-8 locale works''' - if sys.platform == 'win32': - our_locale = 'French' - else: - our_locale = 'fr_FR.UTF-8' - - settings = read_settings(path=SAMPLE_FR_CONFIG, override={ - 'PATH': INPUT_PATH, - 'OUTPUT_PATH': self.temp_path, - 'CACHE_PATH': self.temp_cache, - 'LOCALE': our_locale, - }) - pelican = Pelican(settings=settings) - mute(True)(pelican.run)() - self.assertDirsEqual( - self.temp_path, os.path.join(OUTPUT_PATH, 'custom_locale')) - - def test_theme_static_paths_copy(self): - # the same thing with a specified set of settings should work - settings = read_settings(path=SAMPLE_CONFIG, override={ - 'PATH': INPUT_PATH, - 'OUTPUT_PATH': self.temp_path, - 'CACHE_PATH': self.temp_cache, - 'THEME_STATIC_PATHS': [os.path.join(SAMPLES_PATH, 'very'), - os.path.join(SAMPLES_PATH, 'kinda'), - os.path.join(SAMPLES_PATH, - 'theme_standard')] - }) - pelican = Pelican(settings=settings) - mute(True)(pelican.run)() - theme_output = os.path.join(self.temp_path, 'theme') - extra_path = os.path.join(theme_output, 'exciting', 'new', 'files') - - for file in ['a_stylesheet', 'a_template']: - self.assertTrue(os.path.exists(os.path.join(theme_output, file))) - - for file in ['wow!', 'boom!', 'bap!', 'zap!']: - self.assertTrue(os.path.exists(os.path.join(extra_path, file))) - - def test_theme_static_paths_copy_single_file(self): - # the same thing with a specified set of settings should work - settings = read_settings(path=SAMPLE_CONFIG, override={ - 'PATH': INPUT_PATH, - 'OUTPUT_PATH': self.temp_path, - 'CACHE_PATH': self.temp_cache, - 'THEME_STATIC_PATHS': [os.path.join(SAMPLES_PATH, - 'theme_standard')] - }) - - pelican = Pelican(settings=settings) - mute(True)(pelican.run)() - theme_output = os.path.join(self.temp_path, 'theme') - - for file in ['a_stylesheet', 'a_template']: - self.assertTrue(os.path.exists(os.path.join(theme_output, file))) - - def test_write_only_selected(self): - """Test that only the selected files are written""" - settings = read_settings(path=None, override={ - 'PATH': INPUT_PATH, - 'OUTPUT_PATH': self.temp_path, - 'CACHE_PATH': self.temp_cache, - 'WRITE_SELECTED': [ - os.path.join(self.temp_path, 'oh-yeah.html'), - os.path.join(self.temp_path, 'categories.html'), - ], - 'LOCALE': locale.normalize('en_US'), - }) - pelican = Pelican(settings=settings) - logger = logging.getLogger() - orig_level = logger.getEffectiveLevel() - logger.setLevel(logging.INFO) - mute(True)(pelican.run)() - logger.setLevel(orig_level) - self.assertLogCountEqual( - count=2, - msg="Writing .*", - level=logging.INFO) - - def test_cyclic_intersite_links_no_warnings(self): - settings = read_settings(path=None, override={ - 'PATH': os.path.join(CURRENT_DIR, 'cyclic_intersite_links'), - 'OUTPUT_PATH': self.temp_path, - 'CACHE_PATH': self.temp_cache, - }) - pelican = Pelican(settings=settings) - mute(True)(pelican.run)() - # There are four different intersite links: - # - one pointing to the second article from first and third - # - one pointing to the first article from second and third - # - one pointing to the third article from first and second - # - one pointing to a nonexistent from each - # If everything goes well, only the warning about the nonexistent - # article should be printed. Only two articles are not sufficient, - # since the first will always have _context['generated_content'] empty - # (thus skipping the link resolving) and the second will always have it - # non-empty, containing the first, thus always succeeding. - self.assertLogCountEqual( - count=1, - msg="Unable to find '.*\\.rst', skipping url replacement.", - level=logging.WARNING) - - def test_md_extensions_deprecation(self): - """Test that a warning is issued if MD_EXTENSIONS is used""" - settings = read_settings(path=None, override={ - 'PATH': INPUT_PATH, - 'OUTPUT_PATH': self.temp_path, - 'CACHE_PATH': self.temp_cache, - 'MD_EXTENSIONS': {}, - }) - pelican = Pelican(settings=settings) - mute(True)(pelican.run)() - self.assertLogCountEqual( - count=1, - msg="MD_EXTENSIONS is deprecated use MARKDOWN instead.", - level=logging.WARNING) - - def test_parse_errors(self): - # Verify that just an error is printed and the application doesn't - # abort, exit or something. - settings = read_settings(path=None, override={ - 'PATH': os.path.abspath(os.path.join(CURRENT_DIR, 'parse_error')), - 'OUTPUT_PATH': self.temp_path, - 'CACHE_PATH': self.temp_cache, - }) - pelican = Pelican(settings=settings) - mute(True)(pelican.run)() - self.assertLogCountEqual( - count=1, - msg="Could not process .*parse_error.rst", - level=logging.ERROR) - - def test_module_load(self): - """Test loading via python -m pelican --help displays the help""" - output = subprocess.check_output([ - sys.executable, '-m', 'pelican', '--help' - ]).decode('ascii', 'replace') - assert 'usage:' in output diff --git a/pelican/tests/test_plugins.py b/pelican/tests/test_plugins.py deleted file mode 100644 index 348c3e94..00000000 --- a/pelican/tests/test_plugins.py +++ /dev/null @@ -1,191 +0,0 @@ -import os -from contextlib import contextmanager - -import pelican.tests.dummy_plugins.normal_plugin.normal_plugin as normal_plugin -from pelican.plugins._utils import (get_namespace_plugins, get_plugin_name, - load_plugins) -from pelican.tests.support import unittest - - -@contextmanager -def tmp_namespace_path(path): - '''Context manager for temporarily appending namespace plugin packages - - path: path containing the `pelican` folder - - This modifies the `pelican.__path__` and lets the `pelican.plugins` - namespace package resolve it from that. - ''' - # This avoids calls to internal `pelican.plugins.__path__._recalculate()` - # as it should not be necessary - import pelican - - old_path = pelican.__path__[:] - try: - pelican.__path__.append(os.path.join(path, 'pelican')) - yield - finally: - pelican.__path__ = old_path - - -class PluginTest(unittest.TestCase): - _PLUGIN_FOLDER = os.path.join( - os.path.abspath(os.path.dirname(__file__)), - 'dummy_plugins') - _NS_PLUGIN_FOLDER = os.path.join(_PLUGIN_FOLDER, 'namespace_plugin') - _NORMAL_PLUGIN_FOLDER = os.path.join(_PLUGIN_FOLDER, 'normal_plugin') - - def test_namespace_path_modification(self): - import pelican - import pelican.plugins - old_path = pelican.__path__[:] - - # not existing path - path = os.path.join(self._PLUGIN_FOLDER, 'foo') - with tmp_namespace_path(path): - self.assertIn( - os.path.join(path, 'pelican'), - pelican.__path__) - # foo/pelican does not exist, so it won't propagate - self.assertNotIn( - os.path.join(path, 'pelican', 'plugins'), - pelican.plugins.__path__) - # verify that we restored path back - self.assertEqual(pelican.__path__, old_path) - - # existing path - with tmp_namespace_path(self._NS_PLUGIN_FOLDER): - self.assertIn( - os.path.join(self._NS_PLUGIN_FOLDER, 'pelican'), - pelican.__path__) - # /namespace_plugin/pelican exists, so it should be in - self.assertIn( - os.path.join(self._NS_PLUGIN_FOLDER, 'pelican', 'plugins'), - pelican.plugins.__path__) - self.assertEqual(pelican.__path__, old_path) - - def test_get_namespace_plugins(self): - # existing namespace plugins - existing_ns_plugins = get_namespace_plugins() - - # with plugin - with tmp_namespace_path(self._NS_PLUGIN_FOLDER): - ns_plugins = get_namespace_plugins() - self.assertEqual(len(ns_plugins), len(existing_ns_plugins)+1) - self.assertIn('pelican.plugins.ns_plugin', ns_plugins) - self.assertEqual( - ns_plugins['pelican.plugins.ns_plugin'].NAME, - 'namespace plugin') - - # should be back to existing namespace plugins outside `with` - ns_plugins = get_namespace_plugins() - self.assertEqual(ns_plugins, existing_ns_plugins) - - def test_load_plugins(self): - def get_plugin_names(plugins): - return {get_plugin_name(p) for p in plugins} - - # existing namespace plugins - existing_ns_plugins = load_plugins({}) - - with tmp_namespace_path(self._NS_PLUGIN_FOLDER): - # with no `PLUGINS` setting, load namespace plugins - plugins = load_plugins({}) - self.assertEqual(len(plugins), len(existing_ns_plugins)+1, plugins) - self.assertEqual( - {'pelican.plugins.ns_plugin'} | get_plugin_names(existing_ns_plugins), - get_plugin_names(plugins)) - - # disable namespace plugins with `PLUGINS = []` - SETTINGS = { - 'PLUGINS': [] - } - plugins = load_plugins(SETTINGS) - self.assertEqual(len(plugins), 0, plugins) - - # with `PLUGINS`, load only specified plugins - - # normal plugin - SETTINGS = { - 'PLUGINS': ['normal_plugin'], - 'PLUGIN_PATHS': [self._NORMAL_PLUGIN_FOLDER] - } - plugins = load_plugins(SETTINGS) - self.assertEqual(len(plugins), 1, plugins) - self.assertEqual( - {'normal_plugin'}, - get_plugin_names(plugins)) - - # normal submodule/subpackage plugins - SETTINGS = { - 'PLUGINS': [ - 'normal_submodule_plugin.subplugin', - 'normal_submodule_plugin.subpackage.subpackage', - ], - 'PLUGIN_PATHS': [self._NORMAL_PLUGIN_FOLDER] - } - plugins = load_plugins(SETTINGS) - self.assertEqual(len(plugins), 2, plugins) - self.assertEqual( - {'normal_submodule_plugin.subplugin', - 'normal_submodule_plugin.subpackage.subpackage'}, - get_plugin_names(plugins)) - - # ensure normal plugins are loaded only once - SETTINGS = { - 'PLUGINS': ['normal_plugin'], - 'PLUGIN_PATHS': [self._NORMAL_PLUGIN_FOLDER], - } - plugins = load_plugins(SETTINGS) - for plugin in load_plugins(SETTINGS): - # The second load_plugins() should return the same plugin - # objects as the first one - self.assertIn(plugin, plugins) - - # namespace plugin short - SETTINGS = { - 'PLUGINS': ['ns_plugin'] - } - plugins = load_plugins(SETTINGS) - self.assertEqual(len(plugins), 1, plugins) - self.assertEqual( - {'pelican.plugins.ns_plugin'}, - get_plugin_names(plugins)) - - # namespace plugin long - SETTINGS = { - 'PLUGINS': ['pelican.plugins.ns_plugin'] - } - plugins = load_plugins(SETTINGS) - self.assertEqual(len(plugins), 1, plugins) - self.assertEqual( - {'pelican.plugins.ns_plugin'}, - get_plugin_names(plugins)) - - # normal and namespace plugin - SETTINGS = { - 'PLUGINS': ['normal_plugin', 'ns_plugin'], - 'PLUGIN_PATHS': [self._NORMAL_PLUGIN_FOLDER] - } - plugins = load_plugins(SETTINGS) - self.assertEqual(len(plugins), 2, plugins) - self.assertEqual( - {'normal_plugin', 'pelican.plugins.ns_plugin'}, - get_plugin_names(plugins)) - - def test_get_plugin_name(self): - self.assertEqual( - get_plugin_name(normal_plugin), - 'pelican.tests.dummy_plugins.normal_plugin.normal_plugin', - ) - - class NoopPlugin: - def register(self): - pass - - self.assertEqual( - get_plugin_name(NoopPlugin), - 'PluginTest.test_get_plugin_name..NoopPlugin') - self.assertEqual( - get_plugin_name(NoopPlugin()), - 'PluginTest.test_get_plugin_name..NoopPlugin') diff --git a/pelican/tests/test_readers.py b/pelican/tests/test_readers.py deleted file mode 100644 index ea5f3bdd..00000000 --- a/pelican/tests/test_readers.py +++ /dev/null @@ -1,902 +0,0 @@ -import os -from unittest.mock import patch - -from pelican import readers -from pelican.tests.support import get_settings, unittest -from pelican.utils import SafeDatetime - - -CUR_DIR = os.path.dirname(__file__) -CONTENT_PATH = os.path.join(CUR_DIR, 'content') - - -def _path(*args): - return os.path.join(CONTENT_PATH, *args) - - -class ReaderTest(unittest.TestCase): - - def read_file(self, path, **kwargs): - # Isolate from future API changes to readers.read_file - r = readers.Readers(settings=get_settings(**kwargs)) - return r.read_file(base_path=CONTENT_PATH, path=path) - - def assertDictHasSubset(self, dictionary, subset): - for key, value in subset.items(): - if key in dictionary: - real_value = dictionary.get(key) - self.assertEqual( - value, - real_value, - 'Expected %s to have value %s, but was %s' % - (key, value, real_value)) - else: - self.fail( - 'Expected %s to have value %s, but was not in Dict' % - (key, value)) - - -class TestAssertDictHasSubset(ReaderTest): - def setUp(self): - self.dictionary = { - 'key-a': 'val-a', - 'key-b': 'val-b' - } - - def tearDown(self): - self.dictionary = None - - def test_subset(self): - self.assertDictHasSubset(self.dictionary, {'key-a': 'val-a'}) - - def test_equal(self): - self.assertDictHasSubset(self.dictionary, self.dictionary) - - def test_fail_not_set(self): - self.assertRaisesRegex( - AssertionError, - r'Expected.*key-c.*to have value.*val-c.*but was not in Dict', - self.assertDictHasSubset, - self.dictionary, - {'key-c': 'val-c'}) - - def test_fail_wrong_val(self): - self.assertRaisesRegex( - AssertionError, - r'Expected .*key-a.* to have value .*val-b.* but was .*val-a.*', - self.assertDictHasSubset, - self.dictionary, - {'key-a': 'val-b'}) - - -class DefaultReaderTest(ReaderTest): - - def test_readfile_unknown_extension(self): - with self.assertRaises(TypeError): - self.read_file(path='article_with_metadata.unknownextension') - - def test_readfile_path_metadata_implicit_dates(self): - test_file = 'article_with_metadata_implicit_dates.html' - page = self.read_file(path=test_file, DEFAULT_DATE='fs') - expected = { - 'date': SafeDatetime.fromtimestamp( - os.stat(_path(test_file)).st_mtime), - 'modified': SafeDatetime.fromtimestamp( - os.stat(_path(test_file)).st_mtime) - } - - self.assertDictHasSubset(page.metadata, expected) - - def test_readfile_path_metadata_explicit_dates(self): - test_file = 'article_with_metadata_explicit_dates.html' - page = self.read_file(path=test_file, DEFAULT_DATE='fs') - expected = { - 'date': SafeDatetime(2010, 12, 2, 10, 14), - 'modified': SafeDatetime(2010, 12, 31, 23, 59) - } - - self.assertDictHasSubset(page.metadata, expected) - - def test_readfile_path_metadata_implicit_date_explicit_modified(self): - test_file = 'article_with_metadata_implicit_date_explicit_modified.html' - page = self.read_file(path=test_file, DEFAULT_DATE='fs') - expected = { - 'date': SafeDatetime.fromtimestamp( - os.stat(_path(test_file)).st_mtime), - 'modified': SafeDatetime(2010, 12, 2, 10, 14), - } - - self.assertDictHasSubset(page.metadata, expected) - - def test_readfile_path_metadata_explicit_date_implicit_modified(self): - test_file = 'article_with_metadata_explicit_date_implicit_modified.html' - page = self.read_file(path=test_file, DEFAULT_DATE='fs') - expected = { - 'date': SafeDatetime(2010, 12, 2, 10, 14), - 'modified': SafeDatetime.fromtimestamp( - os.stat(_path(test_file)).st_mtime) - } - - self.assertDictHasSubset(page.metadata, expected) - - def test_find_empty_alt(self): - with patch('pelican.readers.logger') as log_mock: - content = ['', - ''] - - for tag in content: - readers.find_empty_alt(tag, '/test/path') - log_mock.warning.assert_called_with( - 'Empty alt attribute for image %s in %s', - 'test-image.png', - '/test/path', - extra={'limit_msg': - 'Other images have empty alt attributes'} - ) - - -class RstReaderTest(ReaderTest): - - def test_article_with_metadata(self): - page = self.read_file(path='article_with_metadata.rst') - expected = { - 'category': 'yeah', - 'author': 'Alexis Métaireau', - 'title': 'This is a super article !', - 'summary': '

    Multi-line metadata should be' - ' supported\nas well as inline' - ' markup and stuff to "typogrify' - '"...

    \n', - 'date': SafeDatetime(2010, 12, 2, 10, 14), - 'modified': SafeDatetime(2010, 12, 2, 10, 20), - 'tags': ['foo', 'bar', 'foobar'], - 'custom_field': 'http://notmyidea.org', - } - - self.assertDictHasSubset(page.metadata, expected) - - def test_article_with_capitalized_metadata(self): - page = self.read_file(path='article_with_capitalized_metadata.rst') - expected = { - 'category': 'yeah', - 'author': 'Alexis Métaireau', - 'title': 'This is a super article !', - 'summary': '

    Multi-line metadata should be' - ' supported\nas well as inline' - ' markup and stuff to "typogrify' - '"...

    \n', - 'date': SafeDatetime(2010, 12, 2, 10, 14), - 'modified': SafeDatetime(2010, 12, 2, 10, 20), - 'tags': ['foo', 'bar', 'foobar'], - 'custom_field': 'http://notmyidea.org', - } - - self.assertDictHasSubset(page.metadata, expected) - - def test_article_with_filename_metadata(self): - page = self.read_file( - path='2012-11-29_rst_w_filename_meta#foo-bar.rst', - FILENAME_METADATA=None) - expected = { - 'category': 'yeah', - 'author': 'Alexis Métaireau', - 'title': 'Rst with filename metadata', - 'reader': 'rst', - } - self.assertDictHasSubset(page.metadata, expected) - - page = self.read_file( - path='2012-11-29_rst_w_filename_meta#foo-bar.rst', - FILENAME_METADATA=r'(?P\d{4}-\d{2}-\d{2}).*') - expected = { - 'category': 'yeah', - 'author': 'Alexis Métaireau', - 'title': 'Rst with filename metadata', - 'date': SafeDatetime(2012, 11, 29), - 'reader': 'rst', - } - self.assertDictHasSubset(page.metadata, expected) - - page = self.read_file( - path='2012-11-29_rst_w_filename_meta#foo-bar.rst', - FILENAME_METADATA=( - r'(?P\d{4}-\d{2}-\d{2})' - r'_(?P.*)' - r'#(?P.*)-(?P.*)')) - expected = { - 'category': 'yeah', - 'author': 'Alexis Métaireau', - 'title': 'Rst with filename metadata', - 'date': SafeDatetime(2012, 11, 29), - 'slug': 'rst_w_filename_meta', - 'mymeta': 'foo', - 'reader': 'rst', - } - self.assertDictHasSubset(page.metadata, expected) - - def test_article_with_optional_filename_metadata(self): - page = self.read_file( - path='2012-11-29_rst_w_filename_meta#foo-bar.rst', - FILENAME_METADATA=r'(?P\d{4}-\d{2}-\d{2})?') - expected = { - 'date': SafeDatetime(2012, 11, 29), - 'reader': 'rst', - } - self.assertDictHasSubset(page.metadata, expected) - - page = self.read_file( - path='article.rst', - FILENAME_METADATA=r'(?P\d{4}-\d{2}-\d{2})?') - expected = { - 'reader': 'rst', - } - self.assertDictHasSubset(page.metadata, expected) - self.assertNotIn('date', page.metadata, 'Date should not be set.') - - def test_article_metadata_key_lowercase(self): - # Keys of metadata should be lowercase. - reader = readers.RstReader(settings=get_settings()) - content, metadata = reader.read( - _path('article_with_uppercase_metadata.rst')) - - self.assertIn('category', metadata, 'Key should be lowercase.') - self.assertEqual('Yeah', metadata.get('category'), - 'Value keeps case.') - - def test_article_extra_path_metadata(self): - input_with_metadata = '2012-11-29_rst_w_filename_meta#foo-bar.rst' - page_metadata = self.read_file( - path=input_with_metadata, - FILENAME_METADATA=( - r'(?P\d{4}-\d{2}-\d{2})' - r'_(?P.*)' - r'#(?P.*)-(?P.*)' - ), - EXTRA_PATH_METADATA={ - input_with_metadata: { - 'key-1a': 'value-1a', - 'key-1b': 'value-1b' - } - } - ) - expected_metadata = { - 'category': 'yeah', - 'author': 'Alexis Métaireau', - 'title': 'Rst with filename metadata', - 'date': SafeDatetime(2012, 11, 29), - 'slug': 'rst_w_filename_meta', - 'mymeta': 'foo', - 'reader': 'rst', - 'key-1a': 'value-1a', - 'key-1b': 'value-1b' - } - self.assertDictHasSubset(page_metadata.metadata, expected_metadata) - - input_file_path_without_metadata = 'article.rst' - page_without_metadata = self.read_file( - path=input_file_path_without_metadata, - EXTRA_PATH_METADATA={ - input_file_path_without_metadata: { - 'author': 'Charlès Overwrite' - } - } - ) - expected_without_metadata = { - 'category': 'misc', - 'author': 'Charlès Overwrite', - 'title': 'Article title', - 'reader': 'rst', - } - self.assertDictHasSubset( - page_without_metadata.metadata, - expected_without_metadata) - - def test_article_extra_path_metadata_dont_overwrite(self): - # EXTRA_PATH_METADATA['author'] should get ignored - # since we don't overwrite already set values - input_file_path = '2012-11-29_rst_w_filename_meta#foo-bar.rst' - page = self.read_file( - path=input_file_path, - FILENAME_METADATA=( - r'(?P\d{4}-\d{2}-\d{2})' - r'_(?P.*)' - r'#(?P.*)-(?P.*)' - ), - EXTRA_PATH_METADATA={ - input_file_path: { - 'author': 'Charlès Overwrite', - 'key-1b': 'value-1b' - } - } - ) - expected = { - 'category': 'yeah', - 'author': 'Alexis Métaireau', - 'title': 'Rst with filename metadata', - 'date': SafeDatetime(2012, 11, 29), - 'slug': 'rst_w_filename_meta', - 'mymeta': 'foo', - 'reader': 'rst', - 'key-1b': 'value-1b' - } - self.assertDictHasSubset(page.metadata, expected) - - def test_article_extra_path_metadata_recurse(self): - parent = "TestCategory" - notparent = "TestCategory/article" - path = "TestCategory/article_without_category.rst" - - epm = { - parent: {'epmr_inherit': parent, - 'epmr_override': parent, }, - notparent: {'epmr_bogus': notparent}, - path: {'epmr_override': path, }, - } - expected_metadata = { - 'epmr_inherit': parent, - 'epmr_override': path, - } - - page = self.read_file(path=path, EXTRA_PATH_METADATA=epm) - self.assertDictHasSubset(page.metadata, expected_metadata) - - # Make sure vars aren't getting "inherited" by mistake... - path = "article.rst" - page = self.read_file(path=path, EXTRA_PATH_METADATA=epm) - for k in expected_metadata.keys(): - self.assertNotIn(k, page.metadata) - - # Same, but for edge cases where one file's name is a prefix of - # another. - path = "TestCategory/article_without_category.rst" - page = self.read_file(path=path, EXTRA_PATH_METADATA=epm) - for k in epm[notparent].keys(): - self.assertNotIn(k, page.metadata) - - def test_typogrify(self): - # if nothing is specified in the settings, the content should be - # unmodified - page = self.read_file(path='article.rst') - expected = ('

    THIS is some content. With some stuff to ' - '"typogrify"...

    \n

    Now with added ' - 'support for ' - 'TLA.

    \n') - - self.assertEqual(page.content, expected) - - try: - # otherwise, typogrify should be applied - page = self.read_file(path='article.rst', TYPOGRIFY=True) - expected = ( - '

    THIS is some content. ' - 'With some stuff to “typogrify”…

    \n' - '

    Now with added support for TLA.

    \n') - - self.assertEqual(page.content, expected) - except ImportError: - return unittest.skip('need the typogrify distribution') - - def test_typogrify_summary(self): - # if nothing is specified in the settings, the summary should be - # unmodified - page = self.read_file(path='article_with_metadata.rst') - expected = ('

    Multi-line metadata should be' - ' supported\nas well as inline' - ' markup and stuff to "typogrify' - '"...

    \n') - - self.assertEqual(page.metadata['summary'], expected) - - try: - # otherwise, typogrify should be applied - page = self.read_file(path='article_with_metadata.rst', - TYPOGRIFY=True) - expected = ('

    Multi-line metadata should be' - ' supported\nas well as inline' - ' markup and stuff to “typogrify' - '”…

    \n') - - self.assertEqual(page.metadata['summary'], expected) - except ImportError: - return unittest.skip('need the typogrify distribution') - - def test_typogrify_ignore_tags(self): - try: - # typogrify should be able to ignore user specified tags, - # but tries to be clever with widont extension - page = self.read_file(path='article.rst', TYPOGRIFY=True, - TYPOGRIFY_IGNORE_TAGS=['p']) - expected = ('

    THIS is some content. With some stuff to ' - '"typogrify"...

    \n

    Now with added ' - 'support for ' - 'TLA.

    \n') - - self.assertEqual(page.content, expected) - - # typogrify should ignore code blocks by default because - # code blocks are composed inside the pre tag - page = self.read_file(path='article_with_code_block.rst', - TYPOGRIFY=True) - - expected = ('

    An article with some code

    \n' - '
    '
    -                        'x'
    -                        ' &'
    -                        ' y\n
    \n' - '

    A block quote:

    \n
    \nx ' - '& y
    \n' - '

    Normal:\nx' - ' &' - ' y' - '

    \n') - - self.assertEqual(page.content, expected) - - # instruct typogrify to also ignore blockquotes - page = self.read_file(path='article_with_code_block.rst', - TYPOGRIFY=True, - TYPOGRIFY_IGNORE_TAGS=['blockquote']) - - expected = ('

    An article with some code

    \n' - '
    '
    -                        'x'
    -                        ' &'
    -                        ' y\n
    \n' - '

    A block quote:

    \n
    \nx ' - '& y
    \n' - '

    Normal:\nx' - ' &' - ' y' - '

    \n') - - self.assertEqual(page.content, expected) - except ImportError: - return unittest.skip('need the typogrify distribution') - except TypeError: - return unittest.skip('need typogrify version 2.0.4 or later') - - def test_article_with_multiple_authors(self): - page = self.read_file(path='article_with_multiple_authors.rst') - expected = { - 'authors': ['First Author', 'Second Author'] - } - - self.assertDictHasSubset(page.metadata, expected) - - def test_article_with_multiple_authors_semicolon(self): - page = self.read_file( - path='article_with_multiple_authors_semicolon.rst') - expected = { - 'authors': ['Author, First', 'Author, Second'] - } - - self.assertDictHasSubset(page.metadata, expected) - - def test_article_with_multiple_authors_list(self): - page = self.read_file(path='article_with_multiple_authors_list.rst') - expected = { - 'authors': ['Author, First', 'Author, Second'] - } - - self.assertDictHasSubset(page.metadata, expected) - - def test_default_date_formats(self): - tuple_date = self.read_file(path='article.rst', - DEFAULT_DATE=(2012, 5, 1)) - string_date = self.read_file(path='article.rst', - DEFAULT_DATE='2012-05-01') - - self.assertEqual(tuple_date.metadata['date'], - string_date.metadata['date']) - - def test_parse_error(self): - # Verify that it raises an Exception, not nothing and not SystemExit or - # some such - with self.assertRaisesRegex(Exception, "underline too short"): - self.read_file(path='../parse_error/parse_error.rst') - - def test_typogrify_dashes_config(self): - # Test default config - page = self.read_file( - path='article_with_typogrify_dashes.rst', - TYPOGRIFY=True, - TYPOGRIFY_DASHES='default') - expected = "

    One: -; Two: —; Three: —-

    \n" - expected_title = "One -, two —, three —- dashes!" - - self.assertEqual(page.content, expected) - self.assertEqual(page.title, expected_title) - - # Test 'oldschool' variant - page = self.read_file( - path='article_with_typogrify_dashes.rst', - TYPOGRIFY=True, - TYPOGRIFY_DASHES='oldschool') - expected = "

    One: -; Two: –; Three: —

    \n" - expected_title = "One -, two –, three — dashes!" - - self.assertEqual(page.content, expected) - self.assertEqual(page.title, expected_title) - - # Test 'oldschool_inverted' variant - page = self.read_file( - path='article_with_typogrify_dashes.rst', - TYPOGRIFY=True, - TYPOGRIFY_DASHES='oldschool_inverted') - expected = "

    One: -; Two: —; Three: –

    \n" - expected_title = "One -, two —, three – dashes!" - - self.assertEqual(page.content, expected) - self.assertEqual(page.title, expected_title) - - -@unittest.skipUnless(readers.Markdown, "markdown isn't installed") -class MdReaderTest(ReaderTest): - - def test_article_with_metadata(self): - reader = readers.MarkdownReader(settings=get_settings()) - content, metadata = reader.read( - _path('article_with_md_extension.md')) - expected = { - 'category': 'test', - 'title': 'Test md File', - 'summary': '

    I have a lot to test

    ', - 'date': SafeDatetime(2010, 12, 2, 10, 14), - 'modified': SafeDatetime(2010, 12, 2, 10, 20), - 'tags': ['foo', 'bar', 'foobar'], - } - self.assertDictHasSubset(metadata, expected) - - content, metadata = reader.read( - _path('article_with_markdown_and_nonascii_summary.md')) - expected = { - 'title': 'マックOS X 10.8でパイソンとVirtualenvをインストールと設定', - 'summary': '

    パイソンとVirtualenvをまっくでインストールする方法について明確に説明します。

    ', - 'category': '指導書', - 'date': SafeDatetime(2012, 12, 20), - 'modified': SafeDatetime(2012, 12, 22), - 'tags': ['パイソン', 'マック'], - 'slug': 'python-virtualenv-on-mac-osx-mountain-lion-10.8', - } - self.assertDictHasSubset(metadata, expected) - - def test_article_with_footnote(self): - settings = get_settings() - ec = settings['MARKDOWN']['extension_configs'] - ec['markdown.extensions.footnotes'] = {'SEPARATOR': '-'} - reader = readers.MarkdownReader(settings) - content, metadata = reader.read( - _path('article_with_markdown_and_footnote.md')) - expected_content = ( - '

    This is some content' - '1' - ' with some footnotes' - '2

    \n' - - '
    \n' - '
    \n
      \n
    1. \n' - '

      Numbered footnote ' - '

      \n' - '
    2. \n
    3. \n' - '

      Named footnote ' - '

      \n' - '
    4. \n
    \n
    ') - expected_metadata = { - 'title': 'Article with markdown containing footnotes', - 'summary': ( - '

    Summary with inline markup ' - 'should be supported.

    '), - 'date': SafeDatetime(2012, 10, 31), - 'modified': SafeDatetime(2012, 11, 1), - 'multiline': [ - 'Line Metadata should be handle properly.', - 'See syntax of Meta-Data extension of ' - 'Python Markdown package:', - 'If a line is indented by 4 or more spaces,', - 'that line is assumed to be an additional line of the value', - 'for the previous keyword.', - 'A keyword may have as many lines as desired.', - ] - } - self.assertEqual(content, expected_content) - self.assertDictHasSubset(metadata, expected_metadata) - - def test_article_with_file_extensions(self): - reader = readers.MarkdownReader(settings=get_settings()) - # test to ensure the md file extension is being processed by the - # correct reader - content, metadata = reader.read( - _path('article_with_md_extension.md')) - expected = ( - "

    Test Markdown File Header

    \n" - "

    Used for pelican test

    \n" - "

    The quick brown fox jumped over the lazy dog's back.

    ") - self.assertEqual(content, expected) - # test to ensure the mkd file extension is being processed by the - # correct reader - content, metadata = reader.read( - _path('article_with_mkd_extension.mkd')) - expected = ("

    Test Markdown File Header

    \n

    Used for pelican" - " test

    \n

    This is another markdown test file. Uses" - " the mkd extension.

    ") - self.assertEqual(content, expected) - # test to ensure the markdown file extension is being processed by the - # correct reader - content, metadata = reader.read( - _path('article_with_markdown_extension.markdown')) - expected = ("

    Test Markdown File Header

    \n

    Used for pelican" - " test

    \n

    This is another markdown test file. Uses" - " the markdown extension.

    ") - self.assertEqual(content, expected) - # test to ensure the mdown file extension is being processed by the - # correct reader - content, metadata = reader.read( - _path('article_with_mdown_extension.mdown')) - expected = ("

    Test Markdown File Header

    \n

    Used for pelican" - " test

    \n

    This is another markdown test file. Uses" - " the mdown extension.

    ") - self.assertEqual(content, expected) - - def test_article_with_markdown_markup_extension(self): - # test to ensure the markdown markup extension is being processed as - # expected - page = self.read_file( - path='article_with_markdown_markup_extensions.md', - MARKDOWN={ - 'extension_configs': { - 'markdown.extensions.toc': {}, - 'markdown.extensions.codehilite': {}, - 'markdown.extensions.extra': {} - } - } - ) - expected = ('
    \n' - '\n' - '
    \n' - '

    Level1

    \n' - '

    Level2

    ') - - self.assertEqual(page.content, expected) - - def test_article_with_filename_metadata(self): - page = self.read_file( - path='2012-11-30_md_w_filename_meta#foo-bar.md', - FILENAME_METADATA=None) - expected = { - 'category': 'yeah', - 'author': 'Alexis Métaireau', - } - self.assertDictHasSubset(page.metadata, expected) - - page = self.read_file( - path='2012-11-30_md_w_filename_meta#foo-bar.md', - FILENAME_METADATA=r'(?P\d{4}-\d{2}-\d{2}).*') - expected = { - 'category': 'yeah', - 'author': 'Alexis Métaireau', - 'date': SafeDatetime(2012, 11, 30), - } - self.assertDictHasSubset(page.metadata, expected) - - page = self.read_file( - path='2012-11-30_md_w_filename_meta#foo-bar.md', - FILENAME_METADATA=( - r'(?P\d{4}-\d{2}-\d{2})' - r'_(?P.*)' - r'#(?P.*)-(?P.*)')) - expected = { - 'category': 'yeah', - 'author': 'Alexis Métaireau', - 'date': SafeDatetime(2012, 11, 30), - 'slug': 'md_w_filename_meta', - 'mymeta': 'foo', - } - self.assertDictHasSubset(page.metadata, expected) - - def test_article_with_optional_filename_metadata(self): - page = self.read_file( - path='2012-11-30_md_w_filename_meta#foo-bar.md', - FILENAME_METADATA=r'(?P\d{4}-\d{2}-\d{2})?') - expected = { - 'date': SafeDatetime(2012, 11, 30), - 'reader': 'markdown', - } - self.assertDictHasSubset(page.metadata, expected) - - page = self.read_file( - path='empty.md', - FILENAME_METADATA=r'(?P\d{4}-\d{2}-\d{2})?') - expected = { - 'reader': 'markdown', - } - self.assertDictHasSubset(page.metadata, expected) - self.assertNotIn('date', page.metadata, 'Date should not be set.') - - def test_duplicate_tags_or_authors_are_removed(self): - reader = readers.MarkdownReader(settings=get_settings()) - content, metadata = reader.read( - _path('article_with_duplicate_tags_authors.md')) - expected = { - 'tags': ['foo', 'bar', 'foobar'], - 'authors': ['Author, First', 'Author, Second'], - } - self.assertDictHasSubset(metadata, expected) - - def test_metadata_not_parsed_for_metadata(self): - settings = get_settings() - settings['FORMATTED_FIELDS'] = ['summary'] - - reader = readers.MarkdownReader(settings=settings) - content, metadata = reader.read( - _path('article_with_markdown_and_nested_metadata.md')) - expected = { - 'title': 'Article with markdown and nested summary metadata', - 'summary': '

    Test: This metadata value looks like metadata

    ', - } - self.assertDictHasSubset(metadata, expected) - - def test_empty_file(self): - reader = readers.MarkdownReader(settings=get_settings()) - content, metadata = reader.read( - _path('empty.md')) - - self.assertEqual(metadata, {}) - self.assertEqual(content, '') - - def test_empty_file_with_bom(self): - reader = readers.MarkdownReader(settings=get_settings()) - content, metadata = reader.read( - _path('empty_with_bom.md')) - - self.assertEqual(metadata, {}) - self.assertEqual(content, '') - - def test_typogrify_dashes_config(self): - # Test default config - page = self.read_file( - path='article_with_typogrify_dashes.md', - TYPOGRIFY=True, - TYPOGRIFY_DASHES='default') - expected = "

    One: -; Two: —; Three: —-

    " - expected_title = "One -, two —, three —- dashes!" - - self.assertEqual(page.content, expected) - self.assertEqual(page.title, expected_title) - - # Test 'oldschool' variant - page = self.read_file( - path='article_with_typogrify_dashes.md', - TYPOGRIFY=True, - TYPOGRIFY_DASHES='oldschool') - expected = "

    One: -; Two: –; Three: —

    " - expected_title = "One -, two –, three — dashes!" - - self.assertEqual(page.content, expected) - self.assertEqual(page.title, expected_title) - - # Test 'oldschool_inverted' variant - page = self.read_file( - path='article_with_typogrify_dashes.md', - TYPOGRIFY=True, - TYPOGRIFY_DASHES='oldschool_inverted') - expected = "

    One: -; Two: —; Three: –

    " - expected_title = "One -, two —, three – dashes!" - - self.assertEqual(page.content, expected) - self.assertEqual(page.title, expected_title) - - -class HTMLReaderTest(ReaderTest): - def test_article_with_comments(self): - page = self.read_file(path='article_with_comments.html') - - self.assertEqual(''' - Body content - - ''', page.content) - - def test_article_with_keywords(self): - page = self.read_file(path='article_with_keywords.html') - expected = { - 'tags': ['foo', 'bar', 'foobar'], - } - - self.assertDictHasSubset(page.metadata, expected) - - def test_article_with_metadata(self): - page = self.read_file(path='article_with_metadata.html') - expected = { - 'category': 'yeah', - 'author': 'Alexis Métaireau', - 'title': 'This is a super article !', - 'summary': 'Summary and stuff', - 'date': SafeDatetime(2010, 12, 2, 10, 14), - 'tags': ['foo', 'bar', 'foobar'], - 'custom_field': 'http://notmyidea.org', - } - - self.assertDictHasSubset(page.metadata, expected) - - def test_article_with_multiple_similar_metadata_tags(self): - page = self.read_file(path='article_with_multiple_metadata_tags.html') - expected = { - 'custom_field': ['https://getpelican.com', 'https://www.eff.org'], - } - - self.assertDictHasSubset(page.metadata, expected) - - def test_article_with_multiple_authors(self): - page = self.read_file(path='article_with_multiple_authors.html') - expected = { - 'authors': ['First Author', 'Second Author'] - } - - self.assertDictHasSubset(page.metadata, expected) - - def test_article_with_metadata_and_contents_attrib(self): - page = self.read_file(path='article_with_metadata_and_contents.html') - expected = { - 'category': 'yeah', - 'author': 'Alexis Métaireau', - 'title': 'This is a super article !', - 'summary': 'Summary and stuff', - 'date': SafeDatetime(2010, 12, 2, 10, 14), - 'tags': ['foo', 'bar', 'foobar'], - 'custom_field': 'http://notmyidea.org', - } - self.assertDictHasSubset(page.metadata, expected) - - def test_article_with_null_attributes(self): - page = self.read_file(path='article_with_null_attributes.html') - - self.assertEqual(''' - Ensure that empty attributes are copied properly. - - ''', page.content) - - def test_article_with_attributes_containing_double_quotes(self): - page = self.read_file(path='article_with_attributes_containing_' + - 'double_quotes.html') - self.assertEqual(''' - Ensure that if an attribute value contains a double quote, it is - surrounded with single quotes, otherwise with double quotes. - Span content - Span content - Span content - ''', page.content) - - def test_article_metadata_key_lowercase(self): - # Keys of metadata should be lowercase. - page = self.read_file(path='article_with_uppercase_metadata.html') - - # Key should be lowercase - self.assertIn('category', page.metadata, 'Key should be lowercase.') - - # Value should keep cases - self.assertEqual('Yeah', page.metadata.get('category')) - - def test_article_with_nonconformant_meta_tags(self): - page = self.read_file(path='article_with_nonconformant_meta_tags.html') - expected = { - 'summary': 'Summary and stuff', - 'title': 'Article with Nonconformant HTML meta tags', - } - - self.assertDictHasSubset(page.metadata, expected) - - def test_article_with_inline_svg(self): - page = self.read_file(path='article_with_inline_svg.html') - expected = { - 'title': 'Article with an inline SVG', - } - self.assertDictHasSubset(page.metadata, expected) diff --git a/pelican/tests/test_rstdirectives.py b/pelican/tests/test_rstdirectives.py deleted file mode 100644 index 6b733971..00000000 --- a/pelican/tests/test_rstdirectives.py +++ /dev/null @@ -1,31 +0,0 @@ -from unittest.mock import Mock - -from pelican.tests.support import unittest - - -class Test_abbr_role(unittest.TestCase): - def call_it(self, text): - from pelican.rstdirectives import abbr_role - rawtext = text - lineno = 42 - inliner = Mock(name='inliner') - nodes, system_messages = abbr_role( - 'abbr', rawtext, text, lineno, inliner) - self.assertEqual(system_messages, []) - self.assertEqual(len(nodes), 1) - return nodes[0] - - def test(self): - node = self.call_it("Abbr (Abbreviation)") - self.assertEqual(node.astext(), "Abbr") - self.assertEqual(node['explanation'], "Abbreviation") - - def test_newlines_in_explanation(self): - node = self.call_it("CUL (See you\nlater)") - self.assertEqual(node.astext(), "CUL") - self.assertEqual(node['explanation'], "See you\nlater") - - def test_newlines_in_abbr(self): - node = self.call_it("US of\nA \n (USA)") - self.assertEqual(node.astext(), "US of\nA") - self.assertEqual(node['explanation'], "USA") diff --git a/pelican/tests/test_server.py b/pelican/tests/test_server.py deleted file mode 100644 index 307a3e10..00000000 --- a/pelican/tests/test_server.py +++ /dev/null @@ -1,56 +0,0 @@ -import os -from io import BytesIO -from shutil import rmtree -from tempfile import mkdtemp - -from pelican.server import ComplexHTTPRequestHandler -from pelican.tests.support import unittest - - -class MockRequest: - def makefile(self, *args, **kwargs): - return BytesIO(b"") - - -class MockServer: - pass - - -class TestServer(unittest.TestCase): - - def setUp(self): - self.server = MockServer() - self.temp_output = mkdtemp(prefix='pelicantests.') - self.old_cwd = os.getcwd() - os.chdir(self.temp_output) - - def tearDown(self): - os.chdir(self.old_cwd) - rmtree(self.temp_output) - - def test_get_path_that_exists(self): - handler = ComplexHTTPRequestHandler(MockRequest(), ('0.0.0.0', 8888), - self.server) - handler.base_path = self.temp_output - - open(os.path.join(self.temp_output, 'foo.html'), 'a').close() - os.mkdir(os.path.join(self.temp_output, 'foo')) - open(os.path.join(self.temp_output, 'foo', 'index.html'), 'a').close() - - os.mkdir(os.path.join(self.temp_output, 'bar')) - open(os.path.join(self.temp_output, 'bar', 'index.html'), 'a').close() - - os.mkdir(os.path.join(self.temp_output, 'baz')) - - for suffix in ['', '/']: - path = handler.get_path_that_exists('foo' + suffix) - self.assertEqual(path, 'foo.html') - - path = handler.get_path_that_exists('bar' + suffix) - self.assertEqual(path, 'bar/index.html') - - path = handler.get_path_that_exists('baz' + suffix) - self.assertEqual(path, 'baz/') - - path = handler.get_path_that_exists('quux' + suffix) - self.assertIsNone(path) diff --git a/pelican/tests/test_settings.py b/pelican/tests/test_settings.py deleted file mode 100644 index 83203ae5..00000000 --- a/pelican/tests/test_settings.py +++ /dev/null @@ -1,321 +0,0 @@ -import copy -import locale -import os -from os.path import abspath, dirname, join -from sys import platform - - -from pelican.settings import (DEFAULT_CONFIG, DEFAULT_THEME, - _printf_s_to_format_field, - coerce_overrides, configure_settings, - handle_deprecated_settings, read_settings) -from pelican.tests.support import unittest - - -class TestSettingsConfiguration(unittest.TestCase): - """Provided a file, it should read it, replace the default values, - append new values to the settings (if any), and apply basic settings - optimizations. - """ - def setUp(self): - self.old_locale = locale.setlocale(locale.LC_ALL) - locale.setlocale(locale.LC_ALL, 'C') - self.PATH = abspath(dirname(__file__)) - default_conf = join(self.PATH, 'default_conf.py') - self.settings = read_settings(default_conf) - - def tearDown(self): - locale.setlocale(locale.LC_ALL, self.old_locale) - - def test_overwrite_existing_settings(self): - self.assertEqual(self.settings.get('SITENAME'), "Alexis' log") - self.assertEqual( - self.settings.get('SITEURL'), - 'http://blog.notmyidea.org') - - def test_keep_default_settings(self): - # Keep default settings if not defined. - self.assertEqual( - self.settings.get('DEFAULT_CATEGORY'), - DEFAULT_CONFIG['DEFAULT_CATEGORY']) - - def test_dont_copy_small_keys(self): - # Do not copy keys not in caps. - self.assertNotIn('foobar', self.settings) - - def test_read_empty_settings(self): - # Ensure an empty settings file results in default settings. - settings = read_settings(None) - expected = copy.deepcopy(DEFAULT_CONFIG) - # Added by configure settings - expected['FEED_DOMAIN'] = '' - expected['ARTICLE_EXCLUDES'] = ['pages'] - expected['PAGE_EXCLUDES'] = [''] - self.maxDiff = None - self.assertDictEqual(settings, expected) - - def test_settings_return_independent(self): - # Make sure that the results from one settings call doesn't - # effect past or future instances. - self.PATH = abspath(dirname(__file__)) - default_conf = join(self.PATH, 'default_conf.py') - settings = read_settings(default_conf) - settings['SITEURL'] = 'new-value' - new_settings = read_settings(default_conf) - self.assertNotEqual(new_settings['SITEURL'], settings['SITEURL']) - - def test_defaults_not_overwritten(self): - # This assumes 'SITENAME': 'A Pelican Blog' - settings = read_settings(None) - settings['SITENAME'] = 'Not a Pelican Blog' - self.assertNotEqual(settings['SITENAME'], DEFAULT_CONFIG['SITENAME']) - - def test_static_path_settings_safety(self): - # Disallow static paths from being strings - settings = { - 'STATIC_PATHS': 'foo/bar', - 'THEME_STATIC_PATHS': 'bar/baz', - # These 4 settings are required to run configure_settings - 'PATH': '.', - 'THEME': DEFAULT_THEME, - 'SITEURL': 'http://blog.notmyidea.org/', - 'LOCALE': '', - } - configure_settings(settings) - self.assertEqual( - settings['STATIC_PATHS'], - DEFAULT_CONFIG['STATIC_PATHS']) - self.assertEqual( - settings['THEME_STATIC_PATHS'], - DEFAULT_CONFIG['THEME_STATIC_PATHS']) - - def test_configure_settings(self): - # Manipulations to settings should be applied correctly. - settings = { - 'SITEURL': 'http://blog.notmyidea.org/', - 'LOCALE': '', - 'PATH': os.curdir, - 'THEME': DEFAULT_THEME, - } - configure_settings(settings) - - # SITEURL should not have a trailing slash - self.assertEqual(settings['SITEURL'], 'http://blog.notmyidea.org') - - # FEED_DOMAIN, if undefined, should default to SITEURL - self.assertEqual(settings['FEED_DOMAIN'], 'http://blog.notmyidea.org') - - settings['FEED_DOMAIN'] = 'http://feeds.example.com' - configure_settings(settings) - self.assertEqual(settings['FEED_DOMAIN'], 'http://feeds.example.com') - - def test_theme_settings_exceptions(self): - settings = self.settings - - # Check that theme lookup in "pelican/themes" functions as expected - settings['THEME'] = os.path.split(settings['THEME'])[1] - configure_settings(settings) - self.assertEqual(settings['THEME'], DEFAULT_THEME) - - # Check that non-existent theme raises exception - settings['THEME'] = 'foo' - self.assertRaises(Exception, configure_settings, settings) - - def test_deprecated_dir_setting(self): - settings = self.settings - - settings['ARTICLE_DIR'] = 'foo' - settings['PAGE_DIR'] = 'bar' - - settings = handle_deprecated_settings(settings) - - self.assertEqual(settings['ARTICLE_PATHS'], ['foo']) - self.assertEqual(settings['PAGE_PATHS'], ['bar']) - - with self.assertRaises(KeyError): - settings['ARTICLE_DIR'] - settings['PAGE_DIR'] - - # locale.getdefaultlocale() is broken on Windows - # See: https://bugs.python.org/issue37945 - @unittest.skipIf(platform == 'win32', "Doesn't work on Windows") - def test_default_encoding(self): - # Test that the default locale is set if not specified in settings - - # Reset locale to Python's default locale - locale.setlocale(locale.LC_ALL, 'C') - self.assertEqual(self.settings['LOCALE'], DEFAULT_CONFIG['LOCALE']) - - configure_settings(self.settings) - self.assertEqual(locale.getlocale(), locale.getdefaultlocale()) - - def test_invalid_settings_throw_exception(self): - # Test that the path name is valid - - # test that 'PATH' is set - settings = { - } - - self.assertRaises(Exception, configure_settings, settings) - - # Test that 'PATH' is valid - settings['PATH'] = '' - self.assertRaises(Exception, configure_settings, settings) - - # Test nonexistent THEME - settings['PATH'] = os.curdir - settings['THEME'] = 'foo' - - self.assertRaises(Exception, configure_settings, settings) - - def test__printf_s_to_format_field(self): - for s in ('%s', '{%s}', '{%s'): - option = 'foo/{}/bar.baz'.format(s) - result = _printf_s_to_format_field(option, 'slug') - expected = option % 'qux' - found = result.format(slug='qux') - self.assertEqual(expected, found) - - def test_deprecated_extra_templates_paths(self): - settings = self.settings - settings['EXTRA_TEMPLATES_PATHS'] = ['/foo/bar', '/ha'] - - settings = handle_deprecated_settings(settings) - - self.assertEqual(settings['THEME_TEMPLATES_OVERRIDES'], - ['/foo/bar', '/ha']) - self.assertNotIn('EXTRA_TEMPLATES_PATHS', settings) - - def test_deprecated_paginated_direct_templates(self): - settings = self.settings - settings['PAGINATED_DIRECT_TEMPLATES'] = ['index', 'archives'] - settings['PAGINATED_TEMPLATES'] = {'index': 10, 'category': None} - settings = handle_deprecated_settings(settings) - self.assertEqual(settings['PAGINATED_TEMPLATES'], - {'index': 10, 'category': None, 'archives': None}) - self.assertNotIn('PAGINATED_DIRECT_TEMPLATES', settings) - - def test_deprecated_paginated_direct_templates_from_file(self): - # This is equivalent to reading a settings file that has - # PAGINATED_DIRECT_TEMPLATES defined but no PAGINATED_TEMPLATES. - settings = read_settings(None, override={ - 'PAGINATED_DIRECT_TEMPLATES': ['index', 'archives'] - }) - self.assertEqual(settings['PAGINATED_TEMPLATES'], { - 'archives': None, - 'author': None, - 'index': None, - 'category': None, - 'tag': None}) - self.assertNotIn('PAGINATED_DIRECT_TEMPLATES', settings) - - def test_theme_and_extra_templates_exception(self): - settings = self.settings - settings['EXTRA_TEMPLATES_PATHS'] = ['/ha'] - settings['THEME_TEMPLATES_OVERRIDES'] = ['/foo/bar'] - - self.assertRaises(Exception, handle_deprecated_settings, settings) - - def test_slug_and_slug_regex_substitutions_exception(self): - settings = {} - settings['SLUG_REGEX_SUBSTITUTIONS'] = [('C++', 'cpp')] - settings['TAG_SUBSTITUTIONS'] = [('C#', 'csharp')] - - self.assertRaises(Exception, handle_deprecated_settings, settings) - - def test_deprecated_slug_substitutions(self): - default_slug_regex_subs = self.settings['SLUG_REGEX_SUBSTITUTIONS'] - - # If no deprecated setting is set, don't set new ones - settings = {} - settings = handle_deprecated_settings(settings) - self.assertNotIn('SLUG_REGEX_SUBSTITUTIONS', settings) - self.assertNotIn('TAG_REGEX_SUBSTITUTIONS', settings) - self.assertNotIn('CATEGORY_REGEX_SUBSTITUTIONS', settings) - self.assertNotIn('AUTHOR_REGEX_SUBSTITUTIONS', settings) - - # If SLUG_SUBSTITUTIONS is set, set {SLUG, AUTHOR}_REGEX_SUBSTITUTIONS - # correctly, don't set {CATEGORY, TAG}_REGEX_SUBSTITUTIONS - settings = {} - settings['SLUG_SUBSTITUTIONS'] = [('C++', 'cpp')] - settings = handle_deprecated_settings(settings) - self.assertEqual(settings.get('SLUG_REGEX_SUBSTITUTIONS'), - [(r'C\+\+', 'cpp')] + default_slug_regex_subs) - self.assertNotIn('TAG_REGEX_SUBSTITUTIONS', settings) - self.assertNotIn('CATEGORY_REGEX_SUBSTITUTIONS', settings) - self.assertEqual(settings.get('AUTHOR_REGEX_SUBSTITUTIONS'), - default_slug_regex_subs) - - # If {CATEGORY, TAG, AUTHOR}_SUBSTITUTIONS are set, set - # {CATEGORY, TAG, AUTHOR}_REGEX_SUBSTITUTIONS correctly, don't set - # SLUG_REGEX_SUBSTITUTIONS - settings = {} - settings['TAG_SUBSTITUTIONS'] = [('C#', 'csharp')] - settings['CATEGORY_SUBSTITUTIONS'] = [('C#', 'csharp')] - settings['AUTHOR_SUBSTITUTIONS'] = [('Alexander Todorov', 'atodorov')] - settings = handle_deprecated_settings(settings) - self.assertNotIn('SLUG_REGEX_SUBSTITUTIONS', settings) - self.assertEqual(settings['TAG_REGEX_SUBSTITUTIONS'], - [(r'C\#', 'csharp')] + default_slug_regex_subs) - self.assertEqual(settings['CATEGORY_REGEX_SUBSTITUTIONS'], - [(r'C\#', 'csharp')] + default_slug_regex_subs) - self.assertEqual(settings['AUTHOR_REGEX_SUBSTITUTIONS'], - [(r'Alexander\ Todorov', 'atodorov')] + - default_slug_regex_subs) - - # If {SLUG, CATEGORY, TAG, AUTHOR}_SUBSTITUTIONS are set, set - # {SLUG, CATEGORY, TAG, AUTHOR}_REGEX_SUBSTITUTIONS correctly - settings = {} - settings['SLUG_SUBSTITUTIONS'] = [('C++', 'cpp')] - settings['TAG_SUBSTITUTIONS'] = [('C#', 'csharp')] - settings['CATEGORY_SUBSTITUTIONS'] = [('C#', 'csharp')] - settings['AUTHOR_SUBSTITUTIONS'] = [('Alexander Todorov', 'atodorov')] - settings = handle_deprecated_settings(settings) - self.assertEqual(settings['TAG_REGEX_SUBSTITUTIONS'], - [(r'C\+\+', 'cpp')] + [(r'C\#', 'csharp')] + - default_slug_regex_subs) - self.assertEqual(settings['CATEGORY_REGEX_SUBSTITUTIONS'], - [(r'C\+\+', 'cpp')] + [(r'C\#', 'csharp')] + - default_slug_regex_subs) - self.assertEqual(settings['AUTHOR_REGEX_SUBSTITUTIONS'], - [(r'Alexander\ Todorov', 'atodorov')] + - default_slug_regex_subs) - - # Handle old 'skip' flags correctly - settings = {} - settings['SLUG_SUBSTITUTIONS'] = [('C++', 'cpp', True)] - settings['AUTHOR_SUBSTITUTIONS'] = [('Alexander Todorov', 'atodorov', - False)] - settings = handle_deprecated_settings(settings) - self.assertEqual(settings.get('SLUG_REGEX_SUBSTITUTIONS'), - [(r'C\+\+', 'cpp')] + - [(r'(?u)\A\s*', ''), (r'(?u)\s*\Z', '')]) - self.assertEqual(settings['AUTHOR_REGEX_SUBSTITUTIONS'], - [(r'Alexander\ Todorov', 'atodorov')] + - default_slug_regex_subs) - - def test_deprecated_slug_substitutions_from_file(self): - # This is equivalent to reading a settings file that has - # SLUG_SUBSTITUTIONS defined but no SLUG_REGEX_SUBSTITUTIONS. - settings = read_settings(None, override={ - 'SLUG_SUBSTITUTIONS': [('C++', 'cpp')] - }) - self.assertEqual(settings['SLUG_REGEX_SUBSTITUTIONS'], - [(r'C\+\+', 'cpp')] + - self.settings['SLUG_REGEX_SUBSTITUTIONS']) - self.assertNotIn('SLUG_SUBSTITUTIONS', settings) - - def test_coerce_overrides(self): - overrides = coerce_overrides({ - 'ARTICLE_EXCLUDES': '["testexcl"]', - 'READERS': '{"foo": "bar"}', - 'STATIC_EXCLUDE_SOURCES': 'true', - 'THEME_STATIC_DIR': 'theme', - }) - expected = { - 'ARTICLE_EXCLUDES': ["testexcl"], - 'READERS': {"foo": "bar"}, - 'STATIC_EXCLUDE_SOURCES': True, - 'THEME_STATIC_DIR': 'theme', - } - self.assertDictEqual(overrides, expected) diff --git a/pelican/tests/test_testsuite.py b/pelican/tests/test_testsuite.py deleted file mode 100644 index fa930139..00000000 --- a/pelican/tests/test_testsuite.py +++ /dev/null @@ -1,10 +0,0 @@ -import warnings - -from pelican.tests.support import unittest - - -class TestSuiteTest(unittest.TestCase): - - def test_error_on_warning(self): - with self.assertRaises(UserWarning): - warnings.warn('test warning') diff --git a/pelican/tests/test_urlwrappers.py b/pelican/tests/test_urlwrappers.py deleted file mode 100644 index 66ae1524..00000000 --- a/pelican/tests/test_urlwrappers.py +++ /dev/null @@ -1,85 +0,0 @@ -from pelican.tests.support import unittest -from pelican.urlwrappers import Author, Category, Tag, URLWrapper - - -class TestURLWrapper(unittest.TestCase): - def test_ordering(self): - # URLWrappers are sorted by name - wrapper_a = URLWrapper(name='first', settings={}) - wrapper_b = URLWrapper(name='last', settings={}) - self.assertFalse(wrapper_a > wrapper_b) - self.assertFalse(wrapper_a >= wrapper_b) - self.assertFalse(wrapper_a == wrapper_b) - self.assertTrue(wrapper_a != wrapper_b) - self.assertTrue(wrapper_a <= wrapper_b) - self.assertTrue(wrapper_a < wrapper_b) - wrapper_b.name = 'first' - self.assertFalse(wrapper_a > wrapper_b) - self.assertTrue(wrapper_a >= wrapper_b) - self.assertTrue(wrapper_a == wrapper_b) - self.assertFalse(wrapper_a != wrapper_b) - self.assertTrue(wrapper_a <= wrapper_b) - self.assertFalse(wrapper_a < wrapper_b) - wrapper_a.name = 'last' - self.assertTrue(wrapper_a > wrapper_b) - self.assertTrue(wrapper_a >= wrapper_b) - self.assertFalse(wrapper_a == wrapper_b) - self.assertTrue(wrapper_a != wrapper_b) - self.assertFalse(wrapper_a <= wrapper_b) - self.assertFalse(wrapper_a < wrapper_b) - - def test_equality(self): - tag = Tag('test', settings={}) - cat = Category('test', settings={}) - author = Author('test', settings={}) - - # same name, but different class - self.assertNotEqual(tag, cat) - self.assertNotEqual(tag, author) - - # should be equal vs text representing the same name - self.assertEqual(tag, 'test') - - # should not be equal vs binary - self.assertNotEqual(tag, b'test') - - # Tags describing the same should be equal - tag_equal = Tag('Test', settings={}) - self.assertEqual(tag, tag_equal) - - # Author describing the same should be equal - author_equal = Author('Test', settings={}) - self.assertEqual(author, author_equal) - - cat_ascii = Category('指導書', settings={}) - self.assertEqual(cat_ascii, 'zhi dao shu') - - def test_slugify_with_substitutions_and_dots(self): - tag = Tag('Tag Dot', settings={'TAG_REGEX_SUBSTITUTIONS': [ - ('Tag Dot', 'tag.dot'), - ]}) - cat = Category('Category Dot', - settings={'CATEGORY_REGEX_SUBSTITUTIONS': [ - ('Category Dot', 'cat.dot'), - ]}) - - self.assertEqual(tag.slug, 'tag.dot') - self.assertEqual(cat.slug, 'cat.dot') - - def test_author_slug_substitutions(self): - settings = {'AUTHOR_REGEX_SUBSTITUTIONS': [ - ('Alexander Todorov', 'atodorov'), - ('Krasimir Tsonev', 'krasimir'), - (r'[^\w\s-]', ''), - (r'(?u)\A\s*', ''), - (r'(?u)\s*\Z', ''), - (r'[-\s]+', '-'), - ]} - - author1 = Author('Mr. Senko', settings=settings) - author2 = Author('Alexander Todorov', settings=settings) - author3 = Author('Krasimir Tsonev', settings=settings) - - self.assertEqual(author1.slug, 'mr-senko') - self.assertEqual(author2.slug, 'atodorov') - self.assertEqual(author3.slug, 'krasimir') diff --git a/pelican/tests/test_utils.py b/pelican/tests/test_utils.py deleted file mode 100644 index 10816199..00000000 --- a/pelican/tests/test_utils.py +++ /dev/null @@ -1,833 +0,0 @@ -import locale -import logging -import os -import shutil -import time -from sys import platform -from tempfile import mkdtemp - -import pytz - -from pelican import utils -from pelican.generators import TemplatePagesGenerator -from pelican.readers import Readers -from pelican.settings import read_settings -from pelican.tests.support import (LoggedTestCase, get_article, - locale_available, unittest) -from pelican.writers import Writer - - -class TestUtils(LoggedTestCase): - _new_attribute = 'new_value' - - @utils.deprecated_attribute( - old='_old_attribute', new='_new_attribute', - since=(3, 1, 0), remove=(4, 1, 3)) - def _old_attribute(): - return None - - def test_deprecated_attribute(self): - value = self._old_attribute - self.assertEqual(value, self._new_attribute) - self.assertLogCountEqual( - count=1, - msg=('_old_attribute has been deprecated since 3.1.0 and will be ' - 'removed by version 4.1.3. Use _new_attribute instead'), - level=logging.WARNING) - - def test_get_date(self): - # valid ones - date = utils.SafeDatetime(year=2012, month=11, day=22) - date_hour = utils.SafeDatetime( - year=2012, month=11, day=22, hour=22, minute=11) - date_hour_z = utils.SafeDatetime( - year=2012, month=11, day=22, hour=22, minute=11, - tzinfo=pytz.timezone('UTC')) - date_hour_est = utils.SafeDatetime( - year=2012, month=11, day=22, hour=22, minute=11, - tzinfo=pytz.timezone('EST')) - date_hour_sec = utils.SafeDatetime( - year=2012, month=11, day=22, hour=22, minute=11, second=10) - date_hour_sec_z = utils.SafeDatetime( - year=2012, month=11, day=22, hour=22, minute=11, second=10, - tzinfo=pytz.timezone('UTC')) - date_hour_sec_est = utils.SafeDatetime( - year=2012, month=11, day=22, hour=22, minute=11, second=10, - tzinfo=pytz.timezone('EST')) - date_hour_sec_frac_z = utils.SafeDatetime( - year=2012, month=11, day=22, hour=22, minute=11, second=10, - microsecond=123000, tzinfo=pytz.timezone('UTC')) - dates = { - '2012-11-22': date, - '2012/11/22': date, - '2012-11-22 22:11': date_hour, - '2012/11/22 22:11': date_hour, - '22-11-2012': date, - '22/11/2012': date, - '22.11.2012': date, - '22.11.2012 22:11': date_hour, - '2012-11-22T22:11Z': date_hour_z, - '2012-11-22T22:11-0500': date_hour_est, - '2012-11-22 22:11:10': date_hour_sec, - '2012-11-22T22:11:10Z': date_hour_sec_z, - '2012-11-22T22:11:10-0500': date_hour_sec_est, - '2012-11-22T22:11:10.123Z': date_hour_sec_frac_z, - } - - # examples from http://www.w3.org/TR/NOTE-datetime - iso_8601_date = utils.SafeDatetime(year=1997, month=7, day=16) - iso_8601_date_hour_tz = utils.SafeDatetime( - year=1997, month=7, day=16, hour=19, minute=20, - tzinfo=pytz.timezone('CET')) - iso_8601_date_hour_sec_tz = utils.SafeDatetime( - year=1997, month=7, day=16, hour=19, minute=20, second=30, - tzinfo=pytz.timezone('CET')) - iso_8601_date_hour_sec_ms_tz = utils.SafeDatetime( - year=1997, month=7, day=16, hour=19, minute=20, second=30, - microsecond=450000, tzinfo=pytz.timezone('CET')) - iso_8601 = { - '1997-07-16': iso_8601_date, - '1997-07-16T19:20+01:00': iso_8601_date_hour_tz, - '1997-07-16T19:20:30+01:00': iso_8601_date_hour_sec_tz, - '1997-07-16T19:20:30.45+01:00': iso_8601_date_hour_sec_ms_tz, - } - - # invalid ones - invalid_dates = ['2010-110-12', 'yay'] - - for value, expected in dates.items(): - self.assertEqual(utils.get_date(value), expected, value) - - for value, expected in iso_8601.items(): - self.assertEqual(utils.get_date(value), expected, value) - - for item in invalid_dates: - self.assertRaises(ValueError, utils.get_date, item) - - def test_slugify(self): - - samples = (('this is a test', 'this-is-a-test'), - ('this is a test', 'this-is-a-test'), - ('this → is ← a ↑ test', 'this-is-a-test'), - ('this--is---a test', 'this-is-a-test'), - ('unicode測試許功蓋,你看到了嗎?', - 'unicodece-shi-xu-gong-gai-ni-kan-dao-liao-ma'), - ('大飯原発4号機、18日夜起動へ', - 'da-fan-yuan-fa-4hao-ji-18ri-ye-qi-dong-he'),) - - settings = read_settings() - subs = settings['SLUG_REGEX_SUBSTITUTIONS'] - - for value, expected in samples: - self.assertEqual(utils.slugify(value, regex_subs=subs), expected) - - self.assertEqual(utils.slugify('Cat', regex_subs=subs), 'cat') - self.assertEqual( - utils.slugify('Cat', regex_subs=subs, preserve_case=False), 'cat') - self.assertEqual( - utils.slugify('Cat', regex_subs=subs, preserve_case=True), 'Cat') - - def test_slugify_use_unicode(self): - - samples = ( - ('this is a test', 'this-is-a-test'), - ('this is a test', 'this-is-a-test'), - ('this → is ← a ↑ test', 'this-is-a-test'), - ('this--is---a test', 'this-is-a-test'), - ('unicode測試許功蓋,你看到了嗎?', 'unicode測試許功蓋你看到了嗎'), - ('Çığ', 'çığ') - ) - - settings = read_settings() - subs = settings['SLUG_REGEX_SUBSTITUTIONS'] - - for value, expected in samples: - self.assertEqual( - utils.slugify(value, regex_subs=subs, use_unicode=True), - expected) - - # check with preserve case - for value, expected in samples: - self.assertEqual( - utils.slugify('Çığ', regex_subs=subs, - preserve_case=True, use_unicode=True), - 'Çığ') - - # check normalization - samples = ( - ('大飯原発4号機、18日夜起動へ', '大飯原発4号機18日夜起動へ'), - ( - '\N{LATIN SMALL LETTER C}\N{COMBINING CEDILLA}', - '\N{LATIN SMALL LETTER C WITH CEDILLA}' - ) - ) - for value, expected in samples: - self.assertEqual( - utils.slugify(value, regex_subs=subs, use_unicode=True), - expected) - - def test_slugify_substitute(self): - - samples = (('C++ is based on C', 'cpp-is-based-on-c'), - ('C+++ test C+ test', 'cpp-test-c-test'), - ('c++, c#, C#, C++', 'cpp-c-sharp-c-sharp-cpp'), - ('c++-streams', 'cpp-streams'),) - - settings = read_settings() - subs = [ - (r'C\+\+', 'CPP'), - (r'C#', 'C-SHARP'), - ] + settings['SLUG_REGEX_SUBSTITUTIONS'] - for value, expected in samples: - self.assertEqual(utils.slugify(value, regex_subs=subs), expected) - - def test_slugify_substitute_and_keeping_non_alphanum(self): - - samples = (('Fedora QA', 'fedora.qa'), - ('C++ is used by Fedora QA', 'cpp is used by fedora.qa'), - ('C++ is based on C', 'cpp is based on c'), - ('C+++ test C+ test', 'cpp+ test c+ test'),) - - subs = [ - (r'Fedora QA', 'fedora.qa'), - (r'c\+\+', 'cpp'), - ] - for value, expected in samples: - self.assertEqual(utils.slugify(value, regex_subs=subs), expected) - - def test_get_relative_path(self): - - samples = ((os.path.join('test', 'test.html'), os.pardir), - (os.path.join('test', 'test', 'test.html'), - os.path.join(os.pardir, os.pardir)), - ('test.html', os.curdir), - (os.path.join('/test', 'test.html'), os.pardir), - (os.path.join('/test', 'test', 'test.html'), - os.path.join(os.pardir, os.pardir)), - ('/test.html', os.curdir),) - - for value, expected in samples: - self.assertEqual(utils.get_relative_path(value), expected) - - def test_truncate_html_words(self): - # Plain text. - self.assertEqual( - utils.truncate_html_words('short string', 20), - 'short string') - self.assertEqual( - utils.truncate_html_words('word ' * 100, 20), - 'word ' * 20 + '…') - - # Words enclosed or intervaled by HTML tags. - self.assertEqual( - utils.truncate_html_words('

    ' + 'word ' * 100 + '

    ', 20), - '

    ' + 'word ' * 20 + '…

    ') - self.assertEqual( - utils.truncate_html_words( - '' + 'word ' * 100 + '', 20), - '' + 'word ' * 20 + '…') - self.assertEqual( - utils.truncate_html_words('
    ' + 'word ' * 100, 20), - '
    ' + 'word ' * 20 + '…') - self.assertEqual( - utils.truncate_html_words('' + 'word ' * 100, 20), - '' + 'word ' * 20 + '…') - - # Words with hypens and apostrophes. - self.assertEqual( - utils.truncate_html_words("a-b " * 100, 20), - "a-b " * 20 + '…') - self.assertEqual( - utils.truncate_html_words("it's " * 100, 20), - "it's " * 20 + '…') - - # Words with HTML entity references. - self.assertEqual( - utils.truncate_html_words("é " * 100, 20), - "é " * 20 + '…') - self.assertEqual( - utils.truncate_html_words("café " * 100, 20), - "café " * 20 + '…') - self.assertEqual( - utils.truncate_html_words("èlite " * 100, 20), - "èlite " * 20 + '…') - self.assertEqual( - utils.truncate_html_words("cafetiére " * 100, 20), - "cafetiére " * 20 + '…') - self.assertEqual( - utils.truncate_html_words("∫dx " * 100, 20), - "∫dx " * 20 + '…') - - # Words with HTML character references inside and outside - # the ASCII range. - self.assertEqual( - utils.truncate_html_words("é " * 100, 20), - "é " * 20 + '…') - self.assertEqual( - utils.truncate_html_words("∫dx " * 100, 20), - "∫dx " * 20 + '…') - - # Words with invalid or broken HTML references. - self.assertEqual( - utils.truncate_html_words('&invalid;', 20), '&invalid;') - self.assertEqual( - utils.truncate_html_words('�', 20), '�') - self.assertEqual( - utils.truncate_html_words('�', 20), '�') - self.assertEqual( - utils.truncate_html_words('&mdash text', 20), '&mdash text') - self.assertEqual( - utils.truncate_html_words('Ӓ text', 20), 'Ӓ text') - self.assertEqual( - utils.truncate_html_words('઼ text', 20), '઼ text') - - def test_process_translations(self): - fr_articles = [] - en_articles = [] - - # create a bunch of articles - # 0: no translation metadata - fr_articles.append(get_article(lang='fr', slug='yay0', title='Titre', - content='en français')) - en_articles.append(get_article(lang='en', slug='yay0', title='Title', - content='in english')) - # 1: translation metadata on default lang - fr_articles.append(get_article(lang='fr', slug='yay1', title='Titre', - content='en français')) - en_articles.append(get_article(lang='en', slug='yay1', title='Title', - content='in english', - translation='true')) - # 2: translation metadata not on default lang - fr_articles.append(get_article(lang='fr', slug='yay2', title='Titre', - content='en français', - translation='true')) - en_articles.append(get_article(lang='en', slug='yay2', title='Title', - content='in english')) - # 3: back to default language detection if all items have the - # translation metadata - fr_articles.append(get_article(lang='fr', slug='yay3', title='Titre', - content='en français', - translation='yep')) - en_articles.append(get_article(lang='en', slug='yay3', title='Title', - content='in english', - translation='yes')) - # 4-5: translation pairs with the same slug but different category - fr_articles.append(get_article(lang='fr', slug='yay4', title='Titre', - content='en français', category='foo')) - en_articles.append(get_article(lang='en', slug='yay4', title='Title', - content='in english', category='foo')) - fr_articles.append(get_article(lang='fr', slug='yay4', title='Titre', - content='en français', category='bar')) - en_articles.append(get_article(lang='en', slug='yay4', title='Title', - content='in english', category='bar')) - - # try adding articles in both orders - for lang0_articles, lang1_articles in ((fr_articles, en_articles), - (en_articles, fr_articles)): - articles = lang0_articles + lang1_articles - - # test process_translations with falsy translation_id - index, trans = utils.process_translations( - articles, translation_id=None) - for i in range(6): - for lang_articles in [en_articles, fr_articles]: - self.assertIn(lang_articles[i], index) - self.assertNotIn(lang_articles[i], trans) - - # test process_translations with simple and complex translation_id - for translation_id in ['slug', {'slug', 'category'}]: - index, trans = utils.process_translations( - articles, translation_id=translation_id) - - for a in [en_articles[0], fr_articles[1], en_articles[2], - en_articles[3], en_articles[4], en_articles[5]]: - self.assertIn(a, index) - self.assertNotIn(a, trans) - - for a in [fr_articles[0], en_articles[1], fr_articles[2], - fr_articles[3], fr_articles[4], fr_articles[5]]: - self.assertIn(a, trans) - self.assertNotIn(a, index) - - for i in range(6): - self.assertIn(en_articles[i], fr_articles[i].translations) - self.assertIn(fr_articles[i], en_articles[i].translations) - - for a_arts in [en_articles, fr_articles]: - for b_arts in [en_articles, fr_articles]: - if translation_id == 'slug': - self.assertIn(a_arts[4], b_arts[5].translations) - self.assertIn(a_arts[5], b_arts[4].translations) - elif translation_id == {'slug', 'category'}: - self.assertNotIn(a_arts[4], b_arts[5].translations) - self.assertNotIn(a_arts[5], b_arts[4].translations) - - def test_filesystemwatcher(self): - def create_file(name, content): - with open(name, 'w') as f: - f.write(content) - - # disable logger filter - from pelican.utils import logger - logger.disable_filter() - - # create a temp "project" dir - root = mkdtemp() - content_path = os.path.join(root, 'content') - static_path = os.path.join(root, 'content', 'static') - config_file = os.path.join(root, 'config.py') - theme_path = os.path.join(root, 'mytheme') - - # populate - os.mkdir(content_path) - os.mkdir(theme_path) - create_file(config_file, - 'PATH = "content"\n' - 'THEME = "mytheme"\n' - 'STATIC_PATHS = ["static"]') - - t = time.time() - 1000 # make sure it's in the "past" - os.utime(config_file, (t, t)) - settings = read_settings(config_file) - - watcher = utils.FileSystemWatcher(config_file, Readers, settings) - # should get a warning for static not not existing - self.assertLogCountEqual(1, 'Watched path does not exist: .*static') - - # create it and update config - os.mkdir(static_path) - watcher.update_watchers(settings) - # no new warning - self.assertLogCountEqual(1, 'Watched path does not exist: .*static') - - # get modified values - modified = watcher.check() - # empty theme and content should raise warnings - self.assertLogCountEqual(1, 'No valid files found in content') - self.assertLogCountEqual(1, 'Empty theme folder. Using `basic` theme') - - self.assertIsNone(modified['content']) # empty - self.assertIsNone(modified['theme']) # empty - self.assertIsNone(modified['[static]static']) # empty - self.assertTrue(modified['settings']) # modified, first time - - # add a content, add file to theme and check again - create_file(os.path.join(content_path, 'article.md'), - 'Title: test\n' - 'Date: 01-01-2020') - - create_file(os.path.join(theme_path, 'dummy'), - 'test') - - modified = watcher.check() - # no new warning - self.assertLogCountEqual(1, 'No valid files found in content') - self.assertLogCountEqual(1, 'Empty theme folder. Using `basic` theme') - - self.assertIsNone(modified['[static]static']) # empty - self.assertFalse(modified['settings']) # not modified - self.assertTrue(modified['theme']) # modified - self.assertTrue(modified['content']) # modified - - # change config, remove static path - create_file(config_file, - 'PATH = "content"\n' - 'THEME = "mytheme"\n' - 'STATIC_PATHS = []') - - settings = read_settings(config_file) - watcher.update_watchers(settings) - - modified = watcher.check() - self.assertNotIn('[static]static', modified) # should be gone - self.assertTrue(modified['settings']) # modified - self.assertFalse(modified['content']) # not modified - self.assertFalse(modified['theme']) # not modified - - # cleanup - logger.enable_filter() - shutil.rmtree(root) - - def test_clean_output_dir(self): - retention = () - test_directory = os.path.join(os.path.dirname(__file__), - 'clean_output') - content = os.path.join(os.path.dirname(__file__), 'content') - shutil.copytree(content, test_directory) - utils.clean_output_dir(test_directory, retention) - self.assertTrue(os.path.isdir(test_directory)) - self.assertListEqual([], os.listdir(test_directory)) - shutil.rmtree(test_directory) - - def test_clean_output_dir_not_there(self): - retention = () - test_directory = os.path.join(os.path.dirname(__file__), - 'does_not_exist') - utils.clean_output_dir(test_directory, retention) - self.assertFalse(os.path.exists(test_directory)) - - def test_clean_output_dir_is_file(self): - retention = () - test_directory = os.path.join(os.path.dirname(__file__), - 'this_is_a_file') - f = open(test_directory, 'w') - f.write('') - f.close() - utils.clean_output_dir(test_directory, retention) - self.assertFalse(os.path.exists(test_directory)) - - def test_strftime(self): - d = utils.SafeDatetime(2012, 8, 29) - - # simple formatting - self.assertEqual(utils.strftime(d, '%d/%m/%y'), '29/08/12') - self.assertEqual(utils.strftime(d, '%d/%m/%Y'), '29/08/2012') - - # RFC 3339 - self.assertEqual( - utils.strftime(d, '%Y-%m-%dT%H:%M:%SZ'), - '2012-08-29T00:00:00Z') - - # % escaped - self.assertEqual(utils.strftime(d, '%d%%%m%%%y'), '29%08%12') - self.assertEqual(utils.strftime(d, '%d %% %m %% %y'), '29 % 08 % 12') - # not valid % formatter - self.assertEqual(utils.strftime(d, '10% reduction in %Y'), - '10% reduction in 2012') - self.assertEqual(utils.strftime(d, '%10 reduction in %Y'), - '%10 reduction in 2012') - - # with text - self.assertEqual(utils.strftime(d, 'Published in %d-%m-%Y'), - 'Published in 29-08-2012') - - # with non-ascii text - self.assertEqual( - utils.strftime(d, '%d/%m/%Y Øl trinken beim Besäufnis'), - '29/08/2012 Øl trinken beim Besäufnis') - - # alternative formatting options - self.assertEqual(utils.strftime(d, '%-d/%-m/%y'), '29/8/12') - self.assertEqual(utils.strftime(d, '%-H:%-M:%-S'), '0:0:0') - - d = utils.SafeDatetime(2012, 8, 9) - self.assertEqual(utils.strftime(d, '%-d/%-m/%y'), '9/8/12') - - # test the output of utils.strftime in a different locale - # Turkish locale - @unittest.skipUnless(locale_available('tr_TR.UTF-8') or - locale_available('Turkish'), - 'Turkish locale needed') - def test_strftime_locale_dependent_turkish(self): - # store current locale - old_locale = locale.setlocale(locale.LC_ALL) - - if platform == 'win32': - locale.setlocale(locale.LC_ALL, 'Turkish') - else: - locale.setlocale(locale.LC_ALL, 'tr_TR.UTF-8') - - d = utils.SafeDatetime(2012, 8, 29) - - # simple - self.assertEqual(utils.strftime(d, '%d %B %Y'), '29 Ağustos 2012') - self.assertEqual(utils.strftime(d, '%A, %d %B %Y'), - 'Çarşamba, 29 Ağustos 2012') - - # with text - self.assertEqual( - utils.strftime(d, 'Yayınlanma tarihi: %A, %d %B %Y'), - 'Yayınlanma tarihi: Çarşamba, 29 Ağustos 2012') - - # non-ascii format candidate (someone might pass it… for some reason) - self.assertEqual( - utils.strftime(d, '%Y yılında %üretim artışı'), - '2012 yılında %üretim artışı') - - # restore locale back - locale.setlocale(locale.LC_ALL, old_locale) - - # test the output of utils.strftime in a different locale - # French locale - @unittest.skipUnless(locale_available('fr_FR.UTF-8') or - locale_available('French'), - 'French locale needed') - def test_strftime_locale_dependent_french(self): - # store current locale - old_locale = locale.setlocale(locale.LC_ALL) - - if platform == 'win32': - locale.setlocale(locale.LC_ALL, 'French') - else: - locale.setlocale(locale.LC_ALL, 'fr_FR.UTF-8') - - d = utils.SafeDatetime(2012, 8, 29) - - # simple - self.assertEqual(utils.strftime(d, '%d %B %Y'), '29 août 2012') - - # depending on OS, the first letter is m or M - self.assertTrue(utils.strftime(d, '%A') in ('mercredi', 'Mercredi')) - - # with text - self.assertEqual( - utils.strftime(d, 'Écrit le %d %B %Y'), - 'Écrit le 29 août 2012') - - # non-ascii format candidate (someone might pass it… for some reason) - self.assertEqual( - utils.strftime(d, '%écrits en %Y'), - '%écrits en 2012') - - # restore locale back - locale.setlocale(locale.LC_ALL, old_locale) - - def test_maybe_pluralize(self): - self.assertEqual( - utils.maybe_pluralize(0, 'Article', 'Articles'), - '0 Articles') - self.assertEqual( - utils.maybe_pluralize(1, 'Article', 'Articles'), - '1 Article') - self.assertEqual( - utils.maybe_pluralize(2, 'Article', 'Articles'), - '2 Articles') - - -class TestCopy(unittest.TestCase): - '''Tests the copy utility''' - - def setUp(self): - self.root_dir = mkdtemp(prefix='pelicantests.') - self.old_locale = locale.setlocale(locale.LC_ALL) - locale.setlocale(locale.LC_ALL, 'C') - - def tearDown(self): - shutil.rmtree(self.root_dir) - locale.setlocale(locale.LC_ALL, self.old_locale) - - def _create_file(self, *path): - with open(os.path.join(self.root_dir, *path), 'w') as f: - f.write('42\n') - - def _create_dir(self, *path): - os.makedirs(os.path.join(self.root_dir, *path)) - - def _exist_file(self, *path): - path = os.path.join(self.root_dir, *path) - self.assertTrue(os.path.isfile(path), 'File does not exist: %s' % path) - - def _exist_dir(self, *path): - path = os.path.join(self.root_dir, *path) - self.assertTrue(os.path.exists(path), - 'Directory does not exist: %s' % path) - - def test_copy_file_same_path(self): - self._create_file('a.txt') - utils.copy(os.path.join(self.root_dir, 'a.txt'), - os.path.join(self.root_dir, 'b.txt')) - self._exist_file('b.txt') - - def test_copy_file_different_path(self): - self._create_dir('a') - self._create_dir('b') - self._create_file('a', 'a.txt') - utils.copy(os.path.join(self.root_dir, 'a', 'a.txt'), - os.path.join(self.root_dir, 'b', 'b.txt')) - self._exist_dir('b') - self._exist_file('b', 'b.txt') - - def test_copy_file_create_dirs(self): - self._create_file('a.txt') - utils.copy( - os.path.join(self.root_dir, 'a.txt'), - os.path.join(self.root_dir, 'b0', 'b1', 'b2', 'b3', 'b.txt')) - self._exist_dir('b0') - self._exist_dir('b0', 'b1') - self._exist_dir('b0', 'b1', 'b2') - self._exist_dir('b0', 'b1', 'b2', 'b3') - self._exist_file('b0', 'b1', 'b2', 'b3', 'b.txt') - - def test_copy_dir_same_path(self): - self._create_dir('a') - self._create_file('a', 'a.txt') - utils.copy(os.path.join(self.root_dir, 'a'), - os.path.join(self.root_dir, 'b')) - self._exist_dir('b') - self._exist_file('b', 'a.txt') - - def test_copy_dir_different_path(self): - self._create_dir('a0') - self._create_dir('a0', 'a1') - self._create_file('a0', 'a1', 'a.txt') - self._create_dir('b0') - utils.copy(os.path.join(self.root_dir, 'a0', 'a1'), - os.path.join(self.root_dir, 'b0', 'b1')) - self._exist_dir('b0', 'b1') - self._exist_file('b0', 'b1', 'a.txt') - - def test_copy_dir_create_dirs(self): - self._create_dir('a') - self._create_file('a', 'a.txt') - utils.copy(os.path.join(self.root_dir, 'a'), - os.path.join(self.root_dir, 'b0', 'b1', 'b2', 'b3', 'b')) - self._exist_dir('b0') - self._exist_dir('b0', 'b1') - self._exist_dir('b0', 'b1', 'b2') - self._exist_dir('b0', 'b1', 'b2', 'b3') - self._exist_dir('b0', 'b1', 'b2', 'b3', 'b') - self._exist_file('b0', 'b1', 'b2', 'b3', 'b', 'a.txt') - - -class TestDateFormatter(unittest.TestCase): - '''Tests that the output of DateFormatter jinja filter is same as - utils.strftime''' - - def setUp(self): - # prepare a temp content and output folder - self.temp_content = mkdtemp(prefix='pelicantests.') - self.temp_output = mkdtemp(prefix='pelicantests.') - - # prepare a template file - template_dir = os.path.join(self.temp_content, 'template') - template_path = os.path.join(template_dir, 'source.html') - os.makedirs(template_dir) - with open(template_path, 'w') as template_file: - template_file.write('date = {{ date|strftime("%A, %d %B %Y") }}') - self.date = utils.SafeDatetime(2012, 8, 29) - - def tearDown(self): - shutil.rmtree(self.temp_content) - shutil.rmtree(self.temp_output) - # reset locale to default - locale.setlocale(locale.LC_ALL, '') - - @unittest.skipUnless(locale_available('fr_FR.UTF-8') or - locale_available('French'), - 'French locale needed') - def test_french_strftime(self): - # This test tries to reproduce an issue that - # occurred with python3.3 under macos10 only - if platform == 'win32': - locale.setlocale(locale.LC_ALL, 'French') - else: - locale.setlocale(locale.LC_ALL, 'fr_FR.UTF-8') - date = utils.SafeDatetime(2014, 8, 14) - # we compare the lower() dates since macos10 returns - # "Jeudi" for %A whereas linux reports "jeudi" - self.assertEqual( - 'jeudi, 14 août 2014', - utils.strftime(date, date_format="%A, %d %B %Y").lower()) - df = utils.DateFormatter() - self.assertEqual( - 'jeudi, 14 août 2014', - df(date, date_format="%A, %d %B %Y").lower()) - # Let us now set the global locale to C: - locale.setlocale(locale.LC_ALL, 'C') - # DateFormatter should still work as expected - # since it is the whole point of DateFormatter - # (This is where pre-2014/4/15 code fails on macos10) - df_date = df(date, date_format="%A, %d %B %Y").lower() - self.assertEqual('jeudi, 14 août 2014', df_date) - - @unittest.skipUnless(locale_available('fr_FR.UTF-8') or - locale_available('French'), - 'French locale needed') - def test_french_locale(self): - if platform == 'win32': - locale_string = 'French' - else: - locale_string = 'fr_FR.UTF-8' - settings = read_settings( - override={ - 'LOCALE': locale_string, - 'TEMPLATE_PAGES': { - 'template/source.html': 'generated/file.html' - } - }) - - generator = TemplatePagesGenerator( - {'date': self.date}, settings, - self.temp_content, '', self.temp_output) - generator.env.filters.update({'strftime': utils.DateFormatter()}) - - writer = Writer(self.temp_output, settings=settings) - generator.generate_output(writer) - - output_path = os.path.join( - self.temp_output, 'generated', 'file.html') - - # output file has been generated - self.assertTrue(os.path.exists(output_path)) - - # output content is correct - with utils.pelican_open(output_path) as output_file: - self.assertEqual(output_file, - utils.strftime(self.date, 'date = %A, %d %B %Y')) - - @unittest.skipUnless(locale_available('tr_TR.UTF-8') or - locale_available('Turkish'), - 'Turkish locale needed') - def test_turkish_locale(self): - if platform == 'win32': - locale_string = 'Turkish' - else: - locale_string = 'tr_TR.UTF-8' - settings = read_settings( - override={ - 'LOCALE': locale_string, - 'TEMPLATE_PAGES': { - 'template/source.html': 'generated/file.html' - } - }) - - generator = TemplatePagesGenerator( - {'date': self.date}, settings, - self.temp_content, '', self.temp_output) - generator.env.filters.update({'strftime': utils.DateFormatter()}) - - writer = Writer(self.temp_output, settings=settings) - generator.generate_output(writer) - - output_path = os.path.join( - self.temp_output, 'generated', 'file.html') - - # output file has been generated - self.assertTrue(os.path.exists(output_path)) - - # output content is correct - with utils.pelican_open(output_path) as output_file: - self.assertEqual(output_file, - utils.strftime(self.date, 'date = %A, %d %B %Y')) - - -class TestSanitisedJoin(unittest.TestCase): - def test_detect_parent_breakout(self): - with self.assertRaisesRegex( - RuntimeError, - "Attempted to break out of output directory to " - "(.*?:)?/foo/test"): # (.*?:)? accounts for Windows root - utils.sanitised_join( - "/foo/bar", - "../test" - ) - - def test_detect_root_breakout(self): - with self.assertRaisesRegex( - RuntimeError, - "Attempted to break out of output directory to " - "(.*?:)?/test"): # (.*?:)? accounts for Windows root - utils.sanitised_join( - "/foo/bar", - "/test" - ) - - def test_pass_deep_subpaths(self): - self.assertEqual( - utils.sanitised_join( - "/foo/bar", - "test" - ), - utils.posixize_path( - os.path.abspath(os.path.join("/foo/bar", "test"))) - ) diff --git a/pelican/tests/theme_overrides/level1/article.html b/pelican/tests/theme_overrides/level1/article.html deleted file mode 100644 index 12f6b7bf..00000000 --- a/pelican/tests/theme_overrides/level1/article.html +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/pelican/tests/theme_overrides/level2/article.html b/pelican/tests/theme_overrides/level2/article.html deleted file mode 100644 index 12f6b7bf..00000000 --- a/pelican/tests/theme_overrides/level2/article.html +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/pelican/tests/theme_overrides/level2/authors.html b/pelican/tests/theme_overrides/level2/authors.html deleted file mode 100644 index 12f6b7bf..00000000 --- a/pelican/tests/theme_overrides/level2/authors.html +++ /dev/null @@ -1,4 +0,0 @@ -