@@ -170,11 +170,11 @@ def test_egg_fragment(self):
170
170
assert dists [0 ].version == ''
171
171
assert dists [1 ].version == vc
172
172
173
- def test_download_git_with_rev (self , tmpdir , fp ):
173
+ def test_download_git_with_rev (self , tmp_path , fp ):
174
174
url = 'git+https://github.example/group/project@master#egg=foo'
175
175
index = setuptools .package_index .PackageIndex ()
176
176
177
- expected_dir = str ( tmpdir / 'project@master' )
177
+ expected_dir = tmp_path / 'project@master'
178
178
fp .register ([
179
179
'git' ,
180
180
'clone' ,
@@ -184,32 +184,32 @@ def test_download_git_with_rev(self, tmpdir, fp):
184
184
])
185
185
fp .register (['git' , '-C' , expected_dir , 'checkout' , '--quiet' , 'master' ])
186
186
187
- result = index .download (url , str ( tmpdir ) )
187
+ result = index .download (url , tmp_path )
188
188
189
- assert result == expected_dir
189
+ assert result == str ( expected_dir )
190
190
assert len (fp .calls ) == 2
191
191
192
- def test_download_git_no_rev (self , tmpdir , fp ):
192
+ def test_download_git_no_rev (self , tmp_path , fp ):
193
193
url = 'git+https://github.example/group/project#egg=foo'
194
194
index = setuptools .package_index .PackageIndex ()
195
195
196
- expected_dir = str ( tmpdir / 'project' )
196
+ expected_dir = tmp_path / 'project'
197
197
fp .register ([
198
198
'git' ,
199
199
'clone' ,
200
200
'--quiet' ,
201
201
'https://github.example/group/project' ,
202
202
expected_dir ,
203
203
])
204
- index .download (url , str ( tmpdir ) )
204
+ index .download (url , tmp_path )
205
205
206
- def test_download_svn (self , tmpdir ):
206
+ def test_download_svn (self , tmp_path ):
207
207
url = 'svn+https://svn.example/project#egg=foo'
208
208
index = setuptools .package_index .PackageIndex ()
209
209
210
210
msg = r".*SVN download is not supported.*"
211
211
with pytest .raises (distutils .errors .DistutilsError , match = msg ):
212
- index .download (url , str ( tmpdir ) )
212
+ index .download (url , tmp_path )
213
213
214
214
215
215
class TestContentCheckers :
0 commit comments