Copy themes-project to a temp dir, and copy demo-project content to it.
(tmpdir)
| 14 | |
| 15 | @pytest.fixture(scope="function") |
| 16 | def theme_project_tmpdir(tmpdir): |
| 17 | """Copy themes-project to a temp dir, and copy demo-project content to it.""" |
| 18 | themes_dir = os.path.join(os.path.dirname(__file__), "themes-project") |
| 19 | content_dir = os.path.join(os.path.dirname(__file__), "demo-project", "content") |
| 20 | |
| 21 | temp_dir = tmpdir.mkdir("temp").join("themes-project") |
| 22 | |
| 23 | shutil.copytree(themes_dir, str(temp_dir)) |
| 24 | shutil.copytree(content_dir, str(temp_dir.join("content"))) |
| 25 | |
| 26 | return temp_dir |
| 27 | |
| 28 | |
| 29 | @pytest.fixture(scope="function") |