File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -111,3 +111,34 @@ def test_building_empty_site(tmp_path):
111111 )
112112
113113 os .chdir (cwd )
114+
115+
116+ def test_fallback (tmp_path ):
117+ """
118+ Structure:
119+
120+ tmp_path/testproject
121+ website/
122+ ├── docs/
123+ └── mkdocs.yml"""
124+ testproject_path = tmp_path / "testproject"
125+
126+ shutil .copytree (
127+ "tests/basic_setup/empty_site" , str (testproject_path / "website" / "docs" )
128+ )
129+ shutil .copyfile (
130+ "tests/basic_setup/mkdocs_w_contribution.yml" ,
131+ str (testproject_path / "website" / "mkdocs.yml" ),
132+ )
133+
134+ cwd = os .getcwd ()
135+ os .chdir (str (testproject_path ))
136+
137+ result = build_docs_setup (
138+ str (testproject_path / "website/mkdocs.yml" ), str (testproject_path / "site" )
139+ )
140+ assert result .exit_code == 0 , (
141+ "'mkdocs build' command failed. Error: %s" % result .stdout
142+ )
143+
144+ os .chdir (cwd )
You can’t perform that action at this time.
0 commit comments