diff --git a/tests/views/test_current.py b/tests/views/test_current.py index 993ebb74..c89f81b1 100644 --- a/tests/views/test_current.py +++ b/tests/views/test_current.py @@ -136,6 +136,22 @@ def test_write_in_git_dir(self): ignore=CachedIgnore()) current.write(".git/index", "buf", "offset", 1) + def test_write_in_gitignore_dir(self): + with pytest.raises(FuseOSError): + current = CurrentView(repo="repo", uid=1, gid=1, + repo_path="repo_path", + read_only=Event(), + ignore=CachedIgnore()) + current.write(".gitignore", "buf", "offset", 1) + + def test_write_in_modules_dir(self): + with pytest.raises(FuseOSError): + current = CurrentView(repo="repo", uid=1, gid=1, + repo_path="repo_path", + read_only=Event(), + ignore=CachedIgnore()) + current.write(".gitmodules", "buf", "offset", 1) + def test_write_to_large_file(self): current = CurrentView(repo="repo", uid=1, gid=1, repo_path="repo_path",