Skip to content

Commit a5692df

Browse files
authored
disable monorepo tests on windows
1 parent 26f8921 commit a5692df

File tree

3 files changed

+29
-7
lines changed

3 files changed

+29
-7
lines changed

Diff for: tests/fixtures/monorepo/mkdocs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ theme:
1414

1515
plugins:
1616
- search
17-
# - git-revision-date-localized
17+
- git-revision-date-localized
1818
- monorepo

Diff for: tests/fixtures/monorepo/mkdocs_reverse_order.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
site_name: Cats API
2+
3+
nav:
4+
- Intro: 'index.md'
5+
- Authentication: 'authentication.md'
6+
- Components: '*include ./components/*/mkdocs.yml'
7+
- API:
8+
- v1: '!include ./v1/mkdocs.yml'
9+
- v2: '!include ./v2/mkdocs.yml'
10+
- v3: '!include ./v3/mkdocs.yml'
11+
12+
theme:
13+
name: material
14+
15+
plugins:
16+
- search
17+
# Note; here monorepo is defined after git-revision-date-localized
18+
- monorepo
19+
- git-revision-date-localized

Diff for: tests/test_builds.py

+9-6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# standard lib
1414
import logging
1515
import os
16+
import sys
1617
import re
1718
import shutil
1819
from contextlib import contextmanager
@@ -680,14 +681,16 @@ def test_ignored_commits(tmp_path):
680681
assert "May 4, 2018" in contents
681682

682683

684+
@pytest.mark.skipif(sys.platform.startswith("win"), reason="monorepo plugin did not work for me on windows (even without this plugin)")
683685
def test_monorepo_compat(tmp_path):
684686
testproject_path = setup_clean_mkdocs_folder("tests/fixtures/monorepo/mkdocs.yml", tmp_path)
685-
repo = setup_commit_history(testproject_path)
687+
setup_commit_history(testproject_path)
686688
result = build_docs_setup(testproject_path)
689+
assert result.exit_code == 0, f"'mkdocs build' command failed with:\n\n{result.stdout}"
687690

688-
# author = "Test Person <[email protected]>"
689-
# with working_directory(testproject_path):
690-
# repo.git.add(".")
691-
# repo.git.commit(message="add all", author=author, date="1500854705")
692-
691+
@pytest.mark.skipif(sys.platform.startswith("win"), reason="monorepo plugin did not work for me on windows (even without this plugin)")
692+
def test_monorepo_compat_reverse_order(tmp_path):
693+
testproject_path = setup_clean_mkdocs_folder("tests/fixtures/monorepo/mkdocs_reverse_order.yml", tmp_path)
694+
setup_commit_history(testproject_path)
695+
result = build_docs_setup(testproject_path)
693696
assert result.exit_code == 0, f"'mkdocs build' command failed with:\n\n{result.stdout}"

0 commit comments

Comments
 (0)