File tree 2 files changed +10
-3
lines changed
tests/pdm/backend/hooks/version
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,12 @@ def convert_package_paths(self) -> dict[str, list | dict]:
118
118
dir_name = include .rstrip ("/\\ " )
119
119
temp = list (find_packages_iter (dir_name , src = package_dir or "." ))
120
120
if os .path .isfile (os .path .join (dir_name , "__init__.py" )):
121
- temp .insert (0 , dir_name )
121
+ temp .insert (
122
+ 0 ,
123
+ os .path .relpath (dir_name , package_dir or None )
124
+ .replace ("\\ " , "." )
125
+ .replace ("/" , "." ),
126
+ )
122
127
packages_set .update (temp )
123
128
includes .remove (include )
124
129
packages [:] = list (packages_set )
Original file line number Diff line number Diff line change @@ -145,7 +145,8 @@ def scm_dir() -> Iterable:
145
145
@pytest .fixture
146
146
def git (scm_dir : Path ) -> GitScm :
147
147
git = shutil .which ("git" )
148
- assert git is not None , "Cannot find git in path"
148
+ if git is None :
149
+ pytest .skip ("Cannot find git in path" )
149
150
150
151
scm = GitScm (Path (git ), scm_dir )
151
152
@@ -155,7 +156,8 @@ def git(scm_dir: Path) -> GitScm:
155
156
@pytest .fixture
156
157
def hg (scm_dir : Path ) -> HgScm :
157
158
hg = shutil .which ("hg" )
158
- assert hg is not None , "Cannot find hg in path"
159
+ if hg is None :
160
+ pytest .skip ("Cannot find hg in path" )
159
161
160
162
scm = HgScm (Path (hg ), scm_dir )
161
163
You can’t perform that action at this time.
0 commit comments