Skip to content

Commit e183483

Browse files
authored
Pass str to on_rm_rf_error on py35
1 parent 065d032 commit e183483

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

testing/test_tmpdir.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,17 +387,17 @@ def test_on_rm_rf_error(self, tmp_path):
387387
# unknown exception
388388
with pytest.warns(pytest.PytestWarning):
389389
exc_info = (None, RuntimeError(), None)
390-
on_rm_rf_error(os.unlink, fn, exc_info, start_path=tmp_path)
390+
on_rm_rf_error(os.unlink, str(fn), exc_info, start_path=tmp_path)
391391
assert fn.is_file()
392392

393393
# unknown function
394394
with pytest.warns(pytest.PytestWarning):
395395
exc_info = (None, PermissionError(), None)
396-
on_rm_rf_error(None, fn, exc_info, start_path=tmp_path)
396+
on_rm_rf_error(None, str(fn), exc_info, start_path=tmp_path)
397397
assert fn.is_file()
398398

399399
exc_info = (None, PermissionError(), None)
400-
on_rm_rf_error(os.unlink, fn, exc_info, start_path=tmp_path)
400+
on_rm_rf_error(os.unlink, str(fn), exc_info, start_path=tmp_path)
401401
assert not fn.is_file()
402402

403403

0 commit comments

Comments
 (0)