We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f61f00a commit a9f255dCopy full SHA for a9f255d
tests/test_metadata.py
@@ -23,6 +23,17 @@ def dynamic_metadata() -> List[str]:
23
24
@pytest.fixture
25
def root_folder(tmp_path: Path) -> str:
26
+ """
27
+ Returns a "virtual" root folder with a "virtual" git config
28
+
29
+ Git config comes from the tests/configs/gitconfig file
30
31
+ This is necessary to ensure tests run always with the same git configuration file,
32
+ to avoid variability coming from:
33
+ - tests ran on plain files (not linked to any git repo)
34
+ - tests ran on a repository fork (e.g myuser/hatch-openzim)
35
+ - tests ran with a different remote (nothing forces main remote to be named origin)
36
37
git_folder = tmp_path / ".git"
38
git_folder.mkdir()
39
shutil.copy(
0 commit comments