File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ def permission_error_tmpdir(tmp_path):
46
46
"""Fixture to test permissions errors in situations where they are not overcome."""
47
47
td = tmp_path / "testdir"
48
48
td .mkdir ()
49
- (td / "x" ).write_bytes ( b"" )
49
+ (td / "x" ).touch ( )
50
50
51
51
# Set up PermissionError on Windows, where we can't delete read-only files.
52
52
(td / "x" ).chmod (stat .S_IRUSR )
@@ -73,7 +73,7 @@ def test_deletes_nested_dir_with_files(self, tmp_path):
73
73
td / "s" / "y" ,
74
74
td / "s" / "z" ,
75
75
):
76
- f .write_bytes ( b"" )
76
+ f .touch ( )
77
77
78
78
try :
79
79
rmtree (td )
@@ -95,7 +95,7 @@ def test_deletes_dir_with_readonly_files(self, tmp_path):
95
95
for d in td , td / "sub" :
96
96
d .mkdir ()
97
97
for f in td / "x" , td / "sub" / "y" :
98
- f .write_bytes ( b"" )
98
+ f .touch ( )
99
99
f .chmod (0 )
100
100
101
101
try :
@@ -115,7 +115,7 @@ def test_avoids_changing_permissions_outside_tree(self, tmp_path):
115
115
116
116
dir1 = tmp_path / "dir1"
117
117
dir1 .mkdir ()
118
- (dir1 / "file" ).write_bytes ( b"" )
118
+ (dir1 / "file" ).touch ( )
119
119
(dir1 / "file" ).chmod (stat .S_IRUSR )
120
120
old_mode = (dir1 / "file" ).stat ().st_mode
121
121
You can’t perform that action at this time.
0 commit comments