sematic icon indicating copy to clipboard operation
sematic copied to clipboard

test_get_config_override fails locally on fresh system install

Open tscurtu opened this issue 2 years ago • 0 comments

On a fresh system installation, test_get_config_override fails with a permission error:

$ bazel test //sematic/tests:test_config_dir --test_output=all

[...]

=================================== FAILURES ===================================
___________________________ test_get_config_override ___________________________

    def test_get_config_override():
        with environment_variables({_CONFIG_DIR_OVERRIDE_ENV_VAR: ".foo"}):
>           config_dir = get_config_dir()

sematic/tests/test_config_dir.py:21:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sematic/config_dir.py:28: in get_config_dir
    config_dir_path.mkdir()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = PosixPath('/Users/tudorscurtu/.foo'), mode = 511, parents = False
exist_ok = False

    def mkdir(self, mode=0o777, parents=False, exist_ok=False):
        """
        Create a new directory at this given path.
        """
        if self._closed:
            self._raise_closed()
        try:
>           self._accessor.mkdir(self, mode)
E           PermissionError: [Errno 1] Operation not permitted: '/Users/tudorscurtu/.foo'

../../../../../../../../../../../../execroot/sematic/external/python3_8_aarch64-apple-darwin/lib/python3.8/pathlib.py:1288: PermissionError
=========================== short test summary info ============================

[...]

tscurtu avatar Oct 10 '22 22:10 tscurtu