Skip to content

Commit

Permalink
Replace test_simple_build with a new mkdocs_simple.yml
Browse files Browse the repository at this point in the history
`/mkdocs.yml` requires theme and plugins in
`requirements/documentation.txt`,
and `test_simple_build` will fail if they're not installed.

The commit removes those dependencies and
turns it into `tests/fixtures/mkdocs_simple.yml`.
  • Loading branch information
YDX-2147483647 committed Mar 23, 2023
1 parent 4aa6bbb commit 9b81eb1
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 3 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ pre-commit install

# run tests
pytest
# note that some tests are for documentation,
# so they'll fail without requirements/documentation.txt.

# install dependencies for documentation
python -m pip install -U -r requirements/documentation.txt
Expand Down
51 changes: 51 additions & 0 deletions tests/fixtures/mkdocs_simple.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Project information
site_name: MkDocs RSS Plugin
site_description: Documentation about the MkDocs RSS Plugin
site_author: [email protected] (Julien M.)
site_url: https://guts.github.io/mkdocs-rss-plugin/
copyright: "Guts - In Geo Veritas"

# Repository
repo_name: "guts/mkdocs-rss-plugin"
repo_url: "https://github.com/guts/mkdocs-rss-plugin/"
edit_uri: "blob/main/docs/"

docs_dir: "docs/"
use_directory_urls: true

plugins:
- rss:
date_from_meta:
as_creation: "date"
as_update: false
datetime_format: "%Y-%m-%d %H:%M"
default_timezone: "Europe/Paris"
default_time: "22:00"
abstract_chars_count: 160
abstract_delimiter: <!-- more -->
image: https://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Feed-icon.svg/128px-Feed-icon.svg.png
match_path: ".*"
pretty_print: false
url_parameters:
utm_source: "documentation"
utm_medium: "RSS"
utm_campaign: "feed-syndication"
- search

theme:
name: mkdocs
language: en

# Extensions to enhance markdown
markdown_extensions:
- admonition
- attr_list
- codehilite
- meta
- toc:
permalink: "#"

nav:
- "Home": "index.md"
- "Settings": "configuration.md"
- "Changelog": "changelog.md"
2 changes: 1 addition & 1 deletion tests/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def test_simple_build(self):
with tempfile.TemporaryDirectory() as tmpdirname:
cli_result = self.build_docs_setup(
testproject_path="docs",
mkdocs_yml_filepath=Path("mkdocs.yml"),
mkdocs_yml_filepath=Path("tests/fixtures/mkdocs_simple.yml"),
output_path=tmpdirname,
strict=False,
)
Expand Down

0 comments on commit 9b81eb1

Please sign in to comment.