diff options
author | mvel <mvel@yandex-team.ru> | 2022-02-10 16:45:41 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:41 +0300 |
commit | bd30392c4cc92487950adc375c07adf52da1d592 (patch) | |
tree | e8d1a3f19b7fc890bcef6e4cc5de41f1d88c9ac3 /tools/archiver/tests | |
parent | 5d50718e66d9c037dc587a0211110b7d25a66185 (diff) | |
download | ydb-bd30392c4cc92487950adc375c07adf52da1d592.tar.gz |
Restoring authorship annotation for <mvel@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'tools/archiver/tests')
-rw-r--r-- | tools/archiver/tests/directory/file1 | 2 | ||||
-rw-r--r-- | tools/archiver/tests/directory/file2 | 2 | ||||
-rw-r--r-- | tools/archiver/tests/test.py | 72 | ||||
-rw-r--r-- | tools/archiver/tests/ya.make | 6 |
4 files changed, 41 insertions, 41 deletions
diff --git a/tools/archiver/tests/directory/file1 b/tools/archiver/tests/directory/file1 index e2129701f1..ac9b5ed12b 100644 --- a/tools/archiver/tests/directory/file1 +++ b/tools/archiver/tests/directory/file1 @@ -1 +1 @@ -file1 +file1 diff --git a/tools/archiver/tests/directory/file2 b/tools/archiver/tests/directory/file2 index 6c493ff740..c253e57a47 100644 --- a/tools/archiver/tests/directory/file2 +++ b/tools/archiver/tests/directory/file2 @@ -1 +1 @@ -file2 +file2 diff --git a/tools/archiver/tests/test.py b/tools/archiver/tests/test.py index b92d58f6a9..9a8a9c4e14 100644 --- a/tools/archiver/tests/test.py +++ b/tools/archiver/tests/test.py @@ -1,41 +1,41 @@ -import os -import logging -from yatest import common as ytc - -logger = logging.getLogger("test_logger") - - -class TestArchiver(object): - @classmethod - def setup_class(cls): +import os +import logging +from yatest import common as ytc + +logger = logging.getLogger("test_logger") + + +class TestArchiver(object): + @classmethod + def setup_class(cls): cls.archiver_path = ytc.binary_path("tools/archiver/archiver") - - def test_recursive(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", "archive", - "--recursive", - contents, - ] - ) - with open('result', 'w') as archive_list: - ytc.execute( - command=[ - self.archiver_path, - "--list", - "archive", - ], - stdout=archive_list, - stderr=None, - ) - archive_list = sorted(open('result').read().strip().split('\n')) + + def test_recursive(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", "archive", + "--recursive", + contents, + ] + ) + with open('result', 'w') as archive_list: + ytc.execute( + command=[ + self.archiver_path, + "--list", + "archive", + ], + stdout=archive_list, + stderr=None, + ) + archive_list = sorted(open('result').read().strip().split('\n')) assert len(archive_list) == 3 - assert archive_list[0] == 'file1' - assert archive_list[1] == 'file2' + assert archive_list[0] == 'file1' + assert archive_list[1] == 'file2' assert archive_list[2] == 'file3' def test_deduplicate(self): diff --git a/tools/archiver/tests/ya.make b/tools/archiver/tests/ya.make index 445b4d3e70..76b276aa12 100644 --- a/tools/archiver/tests/ya.make +++ b/tools/archiver/tests/ya.make @@ -1,9 +1,9 @@ OWNER(mvel) - + PY2TEST() - + TEST_SRCS(test.py) - + DATA(arcadia/tools/archiver/tests) DEPENDS(tools/archiver) |