예제 #1
0
파일: git_spec.py 프로젝트: tek/proteome
 def to_master(self, repo, commit):
     first = 'first'
     second = 'second'
     file1 = (self.pro1.root / 'test_file_2')
     file1.write_text(first)
     return (
         repo /
         commit(first) @
         (lambda: file1.write_text(second)) /
         commit(second) /
         __.prev() @
         (lambda: file1.read_text().should.equal(first)) /
         __.next() @
         (lambda: file1.read_text().should.equal(second))
     )
예제 #2
0
파일: git_spec.py 프로젝트: tek/proteome
 def prev_next(self, repo, commit):
     first = 'first'
     second = 'second'
     file1 = (self.pro1.root / 'test_file_2')
     file2 = (self.pro1.root / 'test_file')
     file1.write_text(first)
     return (
         repo /
         commit(first) @
         (lambda: file2.write_text(first)) /
         commit(second) @
         (lambda: file1.write_text(second)) /
         commit('third') %
         (lambda a: a.history.should.have.length_of(3)) @
         (lambda: file1.read_text().should.equal(second)) /
         __.prev() @
         (lambda: file1.read_text().should.equal(first)) /
         __.next() @
         (lambda: file1.read_text().should.equal(second))
     )
예제 #3
0
파일: main.py 프로젝트: tek/proteome
 def next(self):
     return self._switch(__.next())