MCPcopy Create free account
hub / github.com/gitless-vcs/gitless / TestOp

Class TestOp

gitless/tests/test_e2e.py:415–442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

413
414
415class TestOp(TestEndToEnd):
416
417 COMMITS_NUMBER = 4
418 OTHER = 'other'
419 MASTER_FILE = 'master_file'
420 OTHER_FILE = 'other_file'
421
422 def setUp(self):
423 super(TestOp, self).setUp()
424
425 self.commits = {}
426 def create_commits(branch_name, fp):
427 self.commits[branch_name] = []
428 utils.append_to_file(fp, contents='contents {0}\n'.format(0))
429 out = utils.stdout(gl.commit(m='ci 0 in {0}'.format(branch_name), inc=fp))
430 self.commits[branch_name].append(
431 re.search(r'Commit Id: (\S*)', out, re.UNICODE).group(1))
432 for i in range(1, self.COMMITS_NUMBER):
433 utils.append_to_file(fp, contents='contents {0}\n'.format(i))
434 out = utils.stdout(gl.commit(m='ci {0} in {1}'.format(i, branch_name)))
435 self.commits[branch_name].append(
436 re.search(r'Commit Id: (\S*)', out, re.UNICODE).group(1))
437
438 gl.branch(c=self.OTHER)
439 create_commits('master', self.MASTER_FILE)
440 gl.switch(self.OTHER)
441 create_commits(self.OTHER, self.OTHER_FILE)
442 gl.switch('master')
443
444
445class TestFuse(TestOp):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected