#!/usr/bin/env python3 # Copyright 2023 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
def _make_test_zips(tmp_dir, create_conflct=False):
zip1 = os.path.join(tmp_dir, 'A.zip')
zip2 = os.path.join(tmp_dir, 'B.zip') with zipfile.ZipFile(zip1, 'w') as z:
z.writestr('file1', 'AAAAA')
z.writestr('file2', 'BBBBB') with zipfile.ZipFile(zip2, 'w') as z:
z.writestr('file2', 'ABABA'if create_conflct else'BBBBB')
z.writestr('file3', 'CCCCC') return zip1, zip2
class ZipHelpersTest(unittest.TestCase): def test_merge_zips__identical_file(self): with tempfile.TemporaryDirectory() as tmp_dir:
zip1, zip2 = _make_test_zips(tmp_dir)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.