diff options
author | Aleksandr <ivansduck@gmail.com> | 2022-02-10 16:47:52 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:52 +0300 |
commit | b05913d1c3c02a773578bceb7285084d2933ae86 (patch) | |
tree | c0748b5dcbade83af788c0abfa89c0383d6b779c /library/python/resource | |
parent | ea6c5b7f172becca389cacaff7d5f45f6adccbe6 (diff) | |
download | ydb-b05913d1c3c02a773578bceb7285084d2933ae86.tar.gz |
Restoring authorship annotation for Aleksandr <ivansduck@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'library/python/resource')
-rw-r--r-- | library/python/resource/__init__.py | 16 | ||||
-rw-r--r-- | library/python/resource/ut/lib/test_simple.py | 22 |
2 files changed, 19 insertions, 19 deletions
diff --git a/library/python/resource/__init__.py b/library/python/resource/__init__.py index 1e4f0526b7..26503ef7fc 100644 --- a/library/python/resource/__init__.py +++ b/library/python/resource/__init__.py @@ -30,8 +30,8 @@ def iteritems(prefix='', strip_prefix=False): if strip_prefix: key = key[len(prefix):] yield key, value - - + + def resfs_file_exists(path): return resfs_src(path, resfs_file=True) is not None @@ -41,9 +41,9 @@ def resfs_files(prefix=''): if isinstance(prefix, six.text_type): decode = lambda s: s.decode('utf-8') return [decode(s) for s in __resfs_files(prefix=prefix)] - - -def find(path): - if isinstance(path, six.text_type): - path = path.encode('utf-8') - return __find(path) + + +def find(path): + if isinstance(path, six.text_type): + path = path.encode('utf-8') + return __find(path) diff --git a/library/python/resource/ut/lib/test_simple.py b/library/python/resource/ut/lib/test_simple.py index f76b656cb9..52f006ff91 100644 --- a/library/python/resource/ut/lib/test_simple.py +++ b/library/python/resource/ut/lib/test_simple.py @@ -1,11 +1,11 @@ -import six # noqa - +import six # noqa + import library.python.resource as rs text = b'na gorshke sidel korol\n' -def test_find(): +def test_find(): assert rs.find('/qw.txt') == text @@ -21,11 +21,11 @@ def test_iter(): ('/1.txt', text), ('/2.txt', text), } - - -def test_resfs_files(): - assert 'contrib/python/py/.dist-info/METADATA' in set(rs.resfs_files()) - - -def test_resfs_read(): - assert 'Metadata-Version' in rs.resfs_read('contrib/python/py/.dist-info/METADATA').decode('utf-8') + + +def test_resfs_files(): + assert 'contrib/python/py/.dist-info/METADATA' in set(rs.resfs_files()) + + +def test_resfs_read(): + assert 'Metadata-Version' in rs.resfs_read('contrib/python/py/.dist-info/METADATA').decode('utf-8') |