mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
Move makedirs to fs.py
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
# encoding: utf-8
|
||||
import os
|
||||
import stat
|
||||
|
||||
import pytest
|
||||
|
||||
from dvc import utils
|
||||
|
||||
@@ -62,17 +59,3 @@ def test_boxify():
|
||||
)
|
||||
|
||||
assert expected == utils.boxify("message")
|
||||
|
||||
|
||||
@pytest.mark.skipif(os.name == "nt", reason="Not supported for Windows.")
|
||||
def test_makedirs_permissions(tmp_dir):
|
||||
dir_mode = 0o755
|
||||
intermediate_dir = "тестовая-директория"
|
||||
test_dir = os.path.join(intermediate_dir, "data")
|
||||
|
||||
assert not os.path.exists(intermediate_dir)
|
||||
|
||||
utils.makedirs(test_dir, mode=dir_mode)
|
||||
|
||||
assert stat.S_IMODE(os.stat(test_dir).st_mode) == dir_mode
|
||||
assert stat.S_IMODE(os.stat(intermediate_dir).st_mode) == dir_mode
|
||||
|
||||
Reference in New Issue
Block a user