diff options
author | pritula <pritula@yandex-team.ru> | 2022-02-10 16:50:53 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:53 +0300 |
commit | 67060456f1386d2ddd6313929f48dc92356a0ff6 (patch) | |
tree | 3c7fa49a87ce72d7d5c6a3d282d9f99c476a79d9 /tools/archiver/tests/test.py | |
parent | 9905811fdc643c722d6464b8cf6661f931510f2f (diff) | |
download | ydb-67060456f1386d2ddd6313929f48dc92356a0ff6.tar.gz |
Restoring authorship annotation for <pritula@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'tools/archiver/tests/test.py')
-rw-r--r-- | tools/archiver/tests/test.py | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/tools/archiver/tests/test.py b/tools/archiver/tests/test.py index b92d58f6a9..fbd02a7b2e 100644 --- a/tools/archiver/tests/test.py +++ b/tools/archiver/tests/test.py @@ -33,36 +33,36 @@ class TestArchiver(object): stderr=None, ) archive_list = sorted(open('result').read().strip().split('\n')) - assert len(archive_list) == 3 + assert len(archive_list) == 3 assert archive_list[0] == 'file1' assert archive_list[1] == 'file2' - assert archive_list[2] == 'file3' - - def test_deduplicate(self): - assert 'archiver' == os.path.basename(self.archiver_path) - assert os.path.exists(self.archiver_path) - contents = ytc.source_path("tools/archiver/tests/directory") - ytc.execute( - command=[ - self.archiver_path, - "--output", "result_dedup", - "--recursive", - "--deduplicate", - "--plain", - contents, - ] - ) - ytc.execute( - command=[ - self.archiver_path, - "--output", "result_no_dedup", - "--recursive", - "--plain", - contents, - ] - ) - with open('result_dedup', 'rb') as f_dedup, open('result_no_dedup', 'rb') as f_no_dedup: - archive_dedup = f_dedup.read() - archive_no_dedup = f_no_dedup.read() + assert archive_list[2] == 'file3' + + def test_deduplicate(self): + assert 'archiver' == os.path.basename(self.archiver_path) + assert os.path.exists(self.archiver_path) + contents = ytc.source_path("tools/archiver/tests/directory") + ytc.execute( + command=[ + self.archiver_path, + "--output", "result_dedup", + "--recursive", + "--deduplicate", + "--plain", + contents, + ] + ) + ytc.execute( + command=[ + self.archiver_path, + "--output", "result_no_dedup", + "--recursive", + "--plain", + contents, + ] + ) + with open('result_dedup', 'rb') as f_dedup, open('result_no_dedup', 'rb') as f_no_dedup: + archive_dedup = f_dedup.read() + archive_no_dedup = f_no_dedup.read() assert len(archive_dedup) == 58 assert len(archive_no_dedup) == 75 |