Skip to content

Commit 9b81eb1

Browse files
Replace test_simple_build with a new mkdocs_simple.yml
`/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`.
1 parent 4aa6bbb commit 9b81eb1

File tree

3 files changed

+52
-3
lines changed

3 files changed

+52
-3
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ pre-commit install
8080

8181
# run tests
8282
pytest
83-
# note that some tests are for documentation,
84-
# so they'll fail without requirements/documentation.txt.
8583

8684
# install dependencies for documentation
8785
python -m pip install -U -r requirements/documentation.txt

tests/fixtures/mkdocs_simple.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Project information
2+
site_name: MkDocs RSS Plugin
3+
site_description: Documentation about the MkDocs RSS Plugin
4+
site_author: [email protected] (Julien M.)
5+
site_url: https://guts.github.io/mkdocs-rss-plugin/
6+
copyright: "Guts - In Geo Veritas"
7+
8+
# Repository
9+
repo_name: "guts/mkdocs-rss-plugin"
10+
repo_url: "https://github.com/guts/mkdocs-rss-plugin/"
11+
edit_uri: "blob/main/docs/"
12+
13+
docs_dir: "docs/"
14+
use_directory_urls: true
15+
16+
plugins:
17+
- rss:
18+
date_from_meta:
19+
as_creation: "date"
20+
as_update: false
21+
datetime_format: "%Y-%m-%d %H:%M"
22+
default_timezone: "Europe/Paris"
23+
default_time: "22:00"
24+
abstract_chars_count: 160
25+
abstract_delimiter: <!-- more -->
26+
image: https://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Feed-icon.svg/128px-Feed-icon.svg.png
27+
match_path: ".*"
28+
pretty_print: false
29+
url_parameters:
30+
utm_source: "documentation"
31+
utm_medium: "RSS"
32+
utm_campaign: "feed-syndication"
33+
- search
34+
35+
theme:
36+
name: mkdocs
37+
language: en
38+
39+
# Extensions to enhance markdown
40+
markdown_extensions:
41+
- admonition
42+
- attr_list
43+
- codehilite
44+
- meta
45+
- toc:
46+
permalink: "#"
47+
48+
nav:
49+
- "Home": "index.md"
50+
- "Settings": "configuration.md"
51+
- "Changelog": "changelog.md"

tests/test_build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def test_simple_build(self):
7171
with tempfile.TemporaryDirectory() as tmpdirname:
7272
cli_result = self.build_docs_setup(
7373
testproject_path="docs",
74-
mkdocs_yml_filepath=Path("mkdocs.yml"),
74+
mkdocs_yml_filepath=Path("tests/fixtures/mkdocs_simple.yml"),
7575
output_path=tmpdirname,
7676
strict=False,
7777
)

0 commit comments

Comments
 (0)