예제 #1
0
 def test_read_with_peeled(self):
     f = StringIO('%s ref/1\n%s ref/2\n^%s\n%s ref/4' % (
       ONES, TWOS, THREES, FOURS))
     self.assertEqual([
       (ONES, 'ref/1', None),
       (TWOS, 'ref/2', THREES),
       (FOURS, 'ref/4', None),
       ], list(read_packed_refs_with_peeled(f)))
예제 #2
0
 def test_read_with_peeled(self):
     f = BytesIO(b'\n'.join([
         ONES + b' ref/1', TWOS + b' ref/2', b'^' + THREES,
         FOURS + b' ref/4'
     ]))
     self.assertEqual([
         (ONES, b'ref/1', None),
         (TWOS, b'ref/2', THREES),
         (FOURS, b'ref/4', None),
     ], list(read_packed_refs_with_peeled(f)))
예제 #3
0
파일: test_refs.py 프로젝트: PKRoma/dulwich
 def test_read_with_peeled(self):
     f = BytesIO(b'\n'.join([
         ONES + b' ref/1',
         TWOS + b' ref/2',
         b'^' + THREES,
         FOURS + b' ref/4']))
     self.assertEqual([
         (ONES, b'ref/1', None),
         (TWOS, b'ref/2', THREES),
         (FOURS, b'ref/4', None),
         ], list(read_packed_refs_with_peeled(f)))
예제 #4
0
 def test_read_with_peeled(self):
     f = BytesIO(b"\n".join([
         ONES + b" ref/1",
         TWOS + b" ref/2",
         b"^" + THREES,
         FOURS + b" ref/4",
     ]))
     self.assertEqual(
         [
             (ONES, b"ref/1", None),
             (TWOS, b"ref/2", THREES),
             (FOURS, b"ref/4", None),
         ],
         list(read_packed_refs_with_peeled(f)),
     )
예제 #5
0
파일: test_refs.py 프로젝트: lelit/dulwich
 def test_read_with_peeled(self):
     f = BytesIO(b"\n".join([ONES + b" ref/1", TWOS + b" ref/2", b"^" + THREES, FOURS + b" ref/4"]))
     self.assertEqual(
         [(ONES, b"ref/1", None), (TWOS, b"ref/2", THREES), (FOURS, b"ref/4", None)],
         list(read_packed_refs_with_peeled(f)),
     )