diff options
| author | Aleksandr <[email protected]> | 2022-02-10 16:47:52 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:47:52 +0300 | 
| commit | ea6c5b7f172becca389cacaff7d5f45f6adccbe6 (patch) | |
| tree | d16cef493ac1e092b4a03ab9437ec06ffe3d188f /library/python/resource | |
| parent | 37de222addabbef336dcaaea5f7c7645a629fc6d (diff) | |
Restoring authorship annotation for Aleksandr <[email protected]>. Commit 1 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 26503ef7fce..1e4f0526b7f 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 52f006ff919..f76b656cb90 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')   | 
