Conditions | 3 |
Total Lines | 12 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | # -*- coding: utf-8 -*- |
||
40 | def test_permission_error(tmp_path): |
||
41 | scripts_path = tmp_path / "scripts" |
||
42 | scripts_path.mkdir(0o000) |
||
43 | with patch.object( |
||
44 | sys, |
||
45 | "argv", |
||
46 | ["devenv", "python", "test-proj", "--scripts_path", str(scripts_path)], |
||
47 | ): |
||
48 | with pytest.raises(PermissionError): |
||
49 | main(parse_args()) |
||
50 | # add all permissions back so the directory can be cleaned up |
||
51 | scripts_path.chmod(0o777) |
||
52 |