Пример #1
0
 def setUp(self):
     TestCase.setUp(self)
     BaseTestFilePackIndexWriting.setUp(self)
     self._has_crc32_checksum = True
     self._supports_large = True
     self._expected_version = 2
     self._write_fn = write_pack_index_v2
Пример #2
0
 def setUp(self):
     TestCase.setUp(self)
     self.store_dir = tempfile.mkdtemp()
     if not isinstance(self.store_dir, bytes):
         self.store_dir = self.store_dir.encode(sys.getfilesystemencoding())
     self.addCleanup(shutil.rmtree, self.store_dir)
     self.store = DiskObjectStore.init(self.store_dir)
Пример #3
0
 def setUp(self):
     TestCase.setUp(self)
     self.store_dir = tempfile.mkdtemp()
     if not isinstance(self.store_dir, bytes):
         self.store_dir = self.store_dir.encode(sys.getfilesystemencoding())
     self.addCleanup(shutil.rmtree, self.store_dir)
     self.store = DiskObjectStore.init(self.store_dir)
Пример #4
0
 def setUp(self):
     TestCase.setUp(self)
     BaseTestFilePackIndexWriting.setUp(self)
     self._has_crc32_checksum = True
     self._supports_large = True
     self._expected_version = 2
     self._write_fn = write_pack_index_v2
Пример #5
0
    def setUp(self):
        TestCase.setUp(self)
        self.rout = BytesIO()
        self.rin = BytesIO()

        def _closeit():
            self.rout.close()
            self.rin.close()

        self.proto = Protocol(self.rin.read, self.rout.write, _closeit)
        self.addCleanup(self.proto.close)
Пример #6
0
    def setUp(self):
        TestCase.setUp(self)
        self.rout = BytesIO()
        self.rin = ReceivableBytesIO()

        def _closeit():
            self.rout.close()
            self.rin.close()

        self.proto = ReceivableProtocol(self.rin.recv, self.rout.write, _closeit)
        self.proto._rbufsize = 8
        self.addCleanup(self.proto.close)
Пример #7
0
    def setUp(self):
        TestCase.setUp(self)
        self.store = MemoryObjectStore()
        blob_a = make_object(Blob, data=b'a')
        blob_b = make_object(Blob, data=b'b')
        blob_c = make_object(Blob, data=b'c')
        for blob in [blob_a, blob_b, blob_c]:
            self.store.add_object(blob)

        blobs = [
          (b'a', blob_a.id, 0o100644),
          (b'ad/b', blob_b.id, 0o100644),
          (b'ad/bd/c', blob_c.id, 0o100755),
          (b'ad/c', blob_c.id, 0o100644),
          (b'c', blob_c.id, 0o100644),
          ]
        self.tree_id = commit_tree(self.store, blobs)
Пример #8
0
    def setUp(self):
        TestCase.setUp(self)
        self.store = MemoryObjectStore()
        blob_a = make_object(Blob, data='a')
        blob_b = make_object(Blob, data='b')
        blob_c = make_object(Blob, data='c')
        for blob in [blob_a, blob_b, blob_c]:
            self.store.add_object(blob)

        blobs = [
          ('a', blob_a.id, 0100644),
          ('ad/b', blob_b.id, 0100644),
          ('ad/bd/c', blob_c.id, 0100755),
          ('ad/c', blob_c.id, 0100644),
          ('c', blob_c.id, 0100644),
          ]
        self.tree_id = commit_tree(self.store, blobs)
Пример #9
0
    def setUp(self):
        TestCase.setUp(self)
        self.store = MemoryObjectStore()
        blob_a = make_object(Blob, data=b"a")
        blob_b = make_object(Blob, data=b"b")
        blob_c = make_object(Blob, data=b"c")
        for blob in [blob_a, blob_b, blob_c]:
            self.store.add_object(blob)

        blobs = [
            (b"a", blob_a.id, 0o100644),
            (b"ad/b", blob_b.id, 0o100644),
            (b"ad/bd/c", blob_c.id, 0o100755),
            (b"ad/c", blob_c.id, 0o100644),
            (b"c", blob_c.id, 0o100644),
            (b"d", blob_c.id, S_IFGITLINK),
        ]
        self.tree_id = commit_tree(self.store, blobs)
Пример #10
0
 def setUp(self):
     TestCase.setUp(self)
     BaseTestFilePackIndexWriting.setUp(self)
     self._has_crc32_checksum = False
     self._expected_version = 1
     self._write_fn = write_pack_index_v1
Пример #11
0
 def setUp(self):
     TestCase.setUp(self)
     self._repo = open_repo('refs.git')
     self._refs = self._repo.refs
Пример #12
0
 def setUp(self):
     TestCase.setUp(self)
     self._has_crc32_checksum = True
Пример #13
0
 def tearDown(self):
     tear_down_repo(self._repo)
     TestCase.tearDown(self)
Пример #14
0
 def setUp(self):
     TestCase.setUp(self)
     self._repo = open_repo('refs.git')
     self.addCleanup(tear_down_repo, self._repo)
     self._refs = self._repo.refs
Пример #15
0
 def setUp(self):
     TestCase.setUp(self)
     self.store_dir = tempfile.mkdtemp()
     self.store = DiskObjectStore.init(self.store_dir)
Пример #16
0
 def setUp(self):
     TestCase.setUp(self)
     self.rout = StringIO()
     self.rin = StringIO()
     self.proto = Protocol(self.rin.read, self.rout.write)
Пример #17
0
 def setUp(self):
     TestCase.setUp(self)
     self._has_crc32_checksum = True
Пример #18
0
 def setUp(self):
     TestCase.setUp(self)
     BaseTestFilePackIndexWriting.setUp(self)
     self._has_crc32_checksum = False
     self._expected_version = 1
     self._write_fn = write_pack_index_v1
Пример #19
0
 def setUp(self):
     TestCase.setUp(self)
     self._output = BytesIO()
     self._writer = BufferedPktLineWriter(self._output.write, bufsize=16)
Пример #20
0
 def setUp(self):
     TestCase.setUp(self)
     conf = swift.load_conf(file=BytesIO(config_file %
                            def_config_file))
     fsc = FakeSwiftConnector('fakerepo', conf=conf)
     self.store = swift.SwiftObjectStore(fsc)
Пример #21
0
 def setUp(self):
     TestCase.setUp(self)
     self.rout = StringIO()
     self.rin = ReceivableStringIO()
     self.proto = ReceivableProtocol(self.rin.recv, self.rout.write)
     self.proto._rbufsize = 8
Пример #22
0
 def setUp(self):
     TestCase.setUp(self)
     self._output = StringIO()
     self._writer = BufferedPktLineWriter(self._output.write, bufsize=16)
Пример #23
0
 def setUp(self):
     TestCase.setUp(self)
     self.rout = StringIO()
     self.rin = ReceivableStringIO()
     self.proto = ReceivableProtocol(self.rin.recv, self.rout.write)
     self.proto._rbufsize = 8
Пример #24
0
 def setUp(self):
     TestCase.setUp(self)
     self.store = MemoryObjectStore()
Пример #25
0
 def setUp(self):
     TestCase.setUp(self)
     self.bases = [MemoryObjectStore(), MemoryObjectStore()]
     self.store = OverlayObjectStore(self.bases, self.bases[0])
Пример #26
0
 def tearDown(self):
     TestCase.tearDown(self)
     PackBasedObjectStoreTests.tearDown(self)
Пример #27
0
 def setUp(self):
     TestCase.setUp(self)
     self._refs = DictRefsContainer(dict(_TEST_REFS))
Пример #28
0
 def setUp(self):
     TestCase.setUp(self)
     self._has_crc32_checksum = True
     self._supports_large = True
Пример #29
0
 def tearDown(self):
     TestCase.tearDown(self)
     PackBasedObjectStoreTests.tearDown(self)
     shutil.rmtree(self.store_dir)
Пример #30
0
 def tearDown(self):
     TestCase.tearDown(self)
Пример #31
0
 def setUp(self):
     TestCase.setUp(self)
     self.rout = StringIO()
     self.rin = StringIO()
     self.proto = Protocol(self.rin.read, self.rout.write)
Пример #32
0
 def setUp(self):
     TestCase.setUp(self)
     self._repo = open_repo('refs.git')
     self._refs = self._repo.refs
Пример #33
0
 def tearDown(self):
     TestCase.tearDown(self)
     BaseTestFilePackIndexWriting.tearDown(self)
Пример #34
0
 def setUp(self):
     TestCase.setUp(self)
     conf = swift.load_conf(file=BytesIO(config_file % def_config_file))
     fsc = FakeSwiftConnector('fakerepo', conf=conf)
     self.store = swift.SwiftObjectStore(fsc)
Пример #35
0
 def setUp(self):
     TestCase.setUp(self)
     self._has_crc32_checksum = True
     self._supports_large = True
Пример #36
0
 def setUp(self):
     TestCase.setUp(self)
     self._refs = DictRefsContainer(dict(_TEST_REFS))
Пример #37
0
 def tearDown(self):
     TestCase.tearDown(self)
     shutil.rmtree(self.store_dir)
Пример #38
0
 def tearDown(self):
     tear_down_repo(self._repo)
     TestCase.tearDown(self)
Пример #39
0
 def setUp(self):
     TestCase.setUp(self)
     self.bases = [MemoryObjectStore(), MemoryObjectStore()]
     self.store = OverlayObjectStore(self.bases, self.bases[0])
Пример #40
0
 def tearDown(self):
     TestCase.tearDown(self)
Пример #41
0
 def setUp(self):
     TestCase.setUp(self)
     self.store = MemoryObjectStore()
Пример #42
0
 def tearDown(self):
     TestCase.tearDown(self)
     BaseTestFilePackIndexWriting.tearDown(self)
Пример #43
0
 def setUp(self):
     TestCase.setUp(self)
     self.store_dir = tempfile.mkdtemp()
     self.addCleanup(shutil.rmtree, self.store_dir)
     self.store = DiskObjectStore.init(self.store_dir)
Пример #44
0
 def setUp(self):
     TestCase.setUp(self)
     self.store_dir = tempfile.mkdtemp()
     self.addCleanup(shutil.rmtree, self.store_dir)
     self.store = DiskObjectStore.init(self.store_dir)
Пример #45
0
 def tearDown(self):
     TestCase.tearDown(self)
     PackBasedObjectStoreTests.tearDown(self)
Пример #46
0
 def setUp(self):
     TestCase.setUp(self)
     self.f = BytesIO(_TEST_REFLOG)
     self.original_log = list(read_reflog(self.f))
     self.f.seek(0)
Пример #47
0
 def setUp(self):
     TestCase.setUp(self)
     self._repo = open_repo('refs.git')
     self.addCleanup(tear_down_repo, self._repo)
     self._refs = self._repo.refs