47 """If the provided path is not writable (e.g. /root), the function should
48 fall back to the package default log folder.
53 candidate = Path(
'/root')
54 result = rl._verify_user_log_path(candidate)
61 testdir = candidate / CONST.LOG_FOLDER_BASE_NAME
62 testdir.mkdir(parents=
True, exist_ok=
True)
63 testfile = testdir /
".rotary_write_test_check"
64 with open(testfile,
"w", encoding=
"utf-8")
as fh:
72 assert result == candidate / CONST.LOG_FOLDER_BASE_NAME
74 assert result == CONST.DEFAULT_LOG_FOLDER