Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit997b761

Browse files
committed
test system: renamed a few test methods in test_remote which could been mistaken for disabled tests, although they are actually called by the test cases as utility functions
1 parent72bcdbd commit997b761

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

‎test/git/test_remote.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def _print_fetchhead(self, repo):
7676
fp.close()
7777

7878

79-
def_test_fetch_result(self,results,remote):
79+
def_do_test_fetch_result(self,results,remote):
8080
# self._print_fetchhead(remote.repo)
8181
assertlen(results)>0andisinstance(results[0],FetchInfo)
8282
forinfoinresults:
@@ -92,7 +92,7 @@ def _test_fetch_result(self, results, remote):
9292
# END forced update checking
9393
# END for each info
9494

95-
def_test_push_result(self,results,remote):
95+
def_do_test_push_result(self,results,remote):
9696
assertlen(results)>0andisinstance(results[0],PushInfo)
9797
forinfoinresults:
9898
assertinfo.flags
@@ -116,7 +116,7 @@ def _test_push_result(self, results, remote):
116116
# END for each info
117117

118118

119-
def_test_fetch_info(self,repo):
119+
def_do_test_fetch_info(self,repo):
120120
self.failUnlessRaises(ValueError,FetchInfo._from_line,repo,"nonsense",'')
121121
self.failUnlessRaises(ValueError,FetchInfo._from_line,repo,"? [up to date] 0.1.7RC -> origin/0.1.7RC",'')
122122

@@ -129,16 +129,16 @@ def _commit_random_file(self, repo):
129129
index.commit("Committing %s"%new_file)
130130
returnnew_file
131131

132-
def_test_fetch(self,remote,rw_repo,remote_repo):
132+
def_do_test_fetch(self,remote,rw_repo,remote_repo):
133133
# specialized fetch testing to de-clutter the main test
134-
self._test_fetch_info(rw_repo)
134+
self._do_test_fetch_info(rw_repo)
135135

136136
deffetch_and_test(remote,**kwargs):
137137
progress=TestRemoteProgress()
138138
kwargs['progress']=progress
139139
res=remote.fetch(**kwargs)
140140
progress.make_assertion()
141-
self._test_fetch_result(res,remote)
141+
self._do_test_fetch_result(res,remote)
142142
returnres
143143
# END fetch and check
144144

@@ -273,21 +273,21 @@ def _test_push_and_pull(self,remote, rw_repo, remote_repo):
273273
progress=TestRemoteProgress()
274274
res=remote.push(lhead.reference,progress)
275275
assertisinstance(res,IterableList)
276-
self._test_push_result(res,remote)
276+
self._do_test_push_result(res,remote)
277277
progress.make_assertion()
278278

279279
# rejected - undo last commit
280280
lhead.reset("HEAD~1")
281281
res=remote.push(lhead.reference)
282282
assertres[0].flags&PushInfo.ERROR
283283
assertres[0].flags&PushInfo.REJECTED
284-
self._test_push_result(res,remote)
284+
self._do_test_push_result(res,remote)
285285

286286
# force rejected pull
287287
res=remote.push('+%s'%lhead.reference)
288288
assertres[0].flags&PushInfo.ERROR==0
289289
assertres[0].flags&PushInfo.FORCED_UPDATE
290-
self._test_push_result(res,remote)
290+
self._do_test_push_result(res,remote)
291291

292292
# invalid refspec
293293
res=remote.push("hellothere")
@@ -301,13 +301,13 @@ def _test_push_and_pull(self,remote, rw_repo, remote_repo):
301301
res=remote.push(progress=progress,tags=True)
302302
assertres[-1].flags&PushInfo.NEW_TAG
303303
progress.make_assertion()
304-
self._test_push_result(res,remote)
304+
self._do_test_push_result(res,remote)
305305

306306
# update push new tags
307307
# Rejection is default
308308
new_tag=TagReference.create(rw_repo,to_be_updated,ref='HEAD~1',force=True)
309309
res=remote.push(tags=True)
310-
self._test_push_result(res,remote)
310+
self._do_test_push_result(res,remote)
311311
assertres[-1].flags&PushInfo.REJECTEDandres[-1].flags&PushInfo.ERROR
312312

313313
# push force this tag
@@ -316,7 +316,7 @@ def _test_push_and_pull(self,remote, rw_repo, remote_repo):
316316

317317
# delete tag - have to do it using refspec
318318
res=remote.push(":%s"%new_tag.path)
319-
self._test_push_result(res,remote)
319+
self._do_test_push_result(res,remote)
320320
assertres[0].flags&PushInfo.DELETED
321321
progress.assert_received_message()
322322

@@ -326,17 +326,17 @@ def _test_push_and_pull(self,remote, rw_repo, remote_repo):
326326
res=remote.push(new_head,progress)
327327
assertres[0].flags&PushInfo.NEW_HEAD
328328
progress.make_assertion()
329-
self._test_push_result(res,remote)
329+
self._do_test_push_result(res,remote)
330330

331331
# delete new branch on the remote end and locally
332332
res=remote.push(":%s"%new_head.path)
333-
self._test_push_result(res,remote)
333+
self._do_test_push_result(res,remote)
334334
Head.delete(rw_repo,new_head)
335335
assertres[-1].flags&PushInfo.DELETED
336336

337337
# --all
338338
res=remote.push(all=True)
339-
self._test_push_result(res,remote)
339+
self._do_test_push_result(res,remote)
340340

341341
remote.pull('master')
342342

@@ -405,7 +405,7 @@ def test_base(self, rw_repo, remote_repo):
405405
# Only for remotes - local cases are the same or less complicated
406406
# as additional progress information will never be emitted
407407
ifremote.name=="daemon_origin":
408-
self._test_fetch(remote,rw_repo,remote_repo)
408+
self._do_test_fetch(remote,rw_repo,remote_repo)
409409
ran_fetch_test=True
410410
# END fetch test
411411

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp