diff options
author | robot-piglet <[email protected]> | 2025-03-17 20:53:16 +0300 |
---|---|---|
committer | robot-piglet <[email protected]> | 2025-03-17 21:03:50 +0300 |
commit | 1a33d7680ad2188c1116a53b49c9f704d3c08652 (patch) | |
tree | 517559262d145233883830c295f171053be7701e /library/python/fs/test/test_fs.py | |
parent | 3e6e38fbbb98346c3621b5bb4960ce1a34efa9a2 (diff) |
Intermediate changes
commit_hash:0440953ee45e859ed9f13c00cc38df246289314f
Diffstat (limited to 'library/python/fs/test/test_fs.py')
-rw-r--r-- | library/python/fs/test/test_fs.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/library/python/fs/test/test_fs.py b/library/python/fs/test/test_fs.py index 9e2c70c0690..066c0237a4a 100644 --- a/library/python/fs/test/test_fs.py +++ b/library/python/fs/test/test_fs.py @@ -808,6 +808,10 @@ def test_read_file(path): mkfile(path('src'), 'SRC') assert library.python.fs.read_file(path('src')).decode(library.python.strings.fs_encoding()) == 'SRC' assert library.python.fs.read_file(path('src'), binary=False) == 'SRC' + # test size + assert library.python.fs.read_file(path('src'), size=2, binary=False) == 'SR' + assert library.python.fs.read_file(path('src'), size=100, binary=False) == 'SRC' + assert library.python.fs.read_file(path('src'), size=-1, binary=False) == 'SRC' @in_env @@ -1023,7 +1027,9 @@ def test_copy2(): def test_commonpath(): pj = os.path.join - pja = lambda *x: os.path.abspath(pj(*x)) + + def pja(*x): + return os.path.abspath(pj(*x)) assert library.python.fs.commonpath(['a', 'b']) == '' assert library.python.fs.commonpath([pj('t', '1')]) == pj('t', '1') |