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
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)
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)
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)
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)
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)
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)
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
def setUp(self): TestCase.setUp(self) self._repo = open_repo('refs.git') self._refs = self._repo.refs
def setUp(self): TestCase.setUp(self) self._has_crc32_checksum = True
def tearDown(self): tear_down_repo(self._repo) TestCase.tearDown(self)
def setUp(self): TestCase.setUp(self) self._repo = open_repo('refs.git') self.addCleanup(tear_down_repo, self._repo) self._refs = self._repo.refs
def setUp(self): TestCase.setUp(self) self.store_dir = tempfile.mkdtemp() self.store = DiskObjectStore.init(self.store_dir)
def setUp(self): TestCase.setUp(self) self.rout = StringIO() self.rin = StringIO() self.proto = Protocol(self.rin.read, self.rout.write)
def setUp(self): TestCase.setUp(self) self._output = BytesIO() self._writer = BufferedPktLineWriter(self._output.write, bufsize=16)
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)
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
def setUp(self): TestCase.setUp(self) self._output = StringIO() self._writer = BufferedPktLineWriter(self._output.write, bufsize=16)
def setUp(self): TestCase.setUp(self) self.store = MemoryObjectStore()
def setUp(self): TestCase.setUp(self) self.bases = [MemoryObjectStore(), MemoryObjectStore()] self.store = OverlayObjectStore(self.bases, self.bases[0])
def tearDown(self): TestCase.tearDown(self) PackBasedObjectStoreTests.tearDown(self)
def setUp(self): TestCase.setUp(self) self._refs = DictRefsContainer(dict(_TEST_REFS))
def setUp(self): TestCase.setUp(self) self._has_crc32_checksum = True self._supports_large = True
def tearDown(self): TestCase.tearDown(self) PackBasedObjectStoreTests.tearDown(self) shutil.rmtree(self.store_dir)
def tearDown(self): TestCase.tearDown(self)
def tearDown(self): TestCase.tearDown(self) BaseTestFilePackIndexWriting.tearDown(self)
def tearDown(self): TestCase.tearDown(self) shutil.rmtree(self.store_dir)
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)
def setUp(self): TestCase.setUp(self) self.f = BytesIO(_TEST_REFLOG) self.original_log = list(read_reflog(self.f)) self.f.seek(0)