MCPcopy Index your code
hub / github.com/dbcli/pgcli / test_ensure_other_create_error

Function test_ensure_other_create_error

tests/test_config.py:23–31  ·  view source on GitHub ↗
(tmpdir)

Source from the content-addressed store, hash-verified

21
22
23def test_ensure_other_create_error(tmpdir):
24 subdir = tmpdir.join('subdir"')
25 rcfile = subdir.join("rcfile")
26
27 # trigger an oserror that isn't "directory already exists"
28 os.chmod(str(tmpdir), stat.S_IREAD)
29
30 with pytest.raises(OSError):
31 ensure_dir_exists(str(rcfile))
32
33
34@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 1

ensure_dir_existsFunction · 0.90

Tested by

no test coverage detected