mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
Try renaming to avoid windows PermErr
This commit is contained in:
parent
4a15b6c010
commit
2b69c11672
1 changed files with 5 additions and 2 deletions
|
@ -202,8 +202,11 @@ class TestCoder(unittest.TestCase):
|
||||||
coder.run(with_message="hi")
|
coder.run(with_message="hi")
|
||||||
self.assertEqual(len(coder.abs_fnames), 2)
|
self.assertEqual(len(coder.abs_fnames), 2)
|
||||||
|
|
||||||
# Delete one of the files
|
# move the file
|
||||||
os.remove(file1)
|
# os.remove() causes PermErr on Windows!
|
||||||
|
# PermissionError: [WinError 32] The process cannot access the file because
|
||||||
|
# it is being used by another process
|
||||||
|
os.rename(file1, file1 + ".renamed")
|
||||||
|
|
||||||
# Call the run method again with a message
|
# Call the run method again with a message
|
||||||
coder.run(with_message="hi")
|
coder.run(with_message="hi")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue