@@ -218,41 +218,32 @@ def test_freeze_mercurial_clone(script, tmpdir):
218
218
_check_output (result , expected )
219
219
220
220
221
- @pytest .mark .network
221
+ @pytest .mark .bzr
222
222
def test_freeze_bazaar_clone (script , tmpdir ):
223
223
"""
224
224
Test freezing a Bazaar clone.
225
225
226
226
"""
227
-
228
- checkout_path = local_checkout (
229
- 'bzr+http://bazaar.launchpad.net/%7Edjango-wikiapp/django-wikiapp/'
230
- 'release-0.1' ,
231
- tmpdir .join ("cache" ),
232
- )
233
- # bzr internally stores windows drives as uppercase; we'll match that.
227
+ try :
228
+ checkout_path = _create_test_package (script , vcs = 'bazaar' )
229
+ except OSError as e :
230
+ pytest .fail ('Invoking `bzr` failed: %s' % e )
234
231
checkout_pathC = checkout_path .replace ('c:' , 'C:' )
235
232
236
233
result = script .run (
237
- 'bzr' , 'checkout' , '-r' , '174' ,
238
- local_repo (
239
- 'bzr+http://bazaar.launchpad.net/%7Edjango-wikiapp/django-wikiapp/'
240
- 'release-0.1' ,
241
- tmpdir .join ("cache" ),
242
- ),
243
- 'django-wikiapp' ,
234
+ 'bzr' , 'checkout' , checkout_path , 'bzr-package'
244
235
)
245
236
result = script .run (
246
237
'python' , 'setup.py' , 'develop' ,
247
- cwd = script .scratch_path / 'django-wikiapp ' ,
238
+ cwd = script .scratch_path / 'bzr-package ' ,
248
239
expect_stderr = True ,
249
240
)
250
241
result = script .pip ('freeze' , expect_stderr = True )
251
242
expected = textwrap .dedent ("""\
252
243
Script result: ...pip freeze
253
244
-- stdout: --------------------
254
- ...-e %s@... #egg=django_wikiapp -...
255
- ...""" % checkout_pathC )
245
+ ...-e bzr+file:// %s@1 #egg=version_pkg-0.1 -...
246
+ ...""" % checkout_path )
256
247
_check_output (result , expected )
257
248
258
249
result = script .pip (
@@ -264,7 +255,7 @@ def test_freeze_bazaar_clone(script, tmpdir):
264
255
Script result: ...pip freeze -f %(repo)s/#egg=django-wikiapp
265
256
-- stdout: --------------------
266
257
-f %(repo)s/#egg=django-wikiapp
267
- ...-e %(repoC)s@...#egg=django_wikiapp -...
258
+ ...-e bzr+file:// %(repoC)s@...#egg=version_pkg -...
268
259
...""" % {'repoC' : checkout_pathC , 'repo' : checkout_path })
269
260
_check_output (result , expected )
270
261
0 commit comments