| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f62df52 commit b66be7c
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -958,6 +958,12 @@ def test_rename(self, rwdir): | |||
| 958 | 958 | assert sm.rename(sm_name) is sm and sm.name == sm_name | |
| 959 | 959 | assert not sm.repo.is_dirty(index=True, working_tree=False, untracked_files=False) | |
| 960 | 960 | ||
| 961 | + # This is needed to work around a PermissionError on Windows, resembling others, | ||
| 962 | + # except new in Python 3.12. (*Maybe* this could be due to changes in CPython's | ||
| 963 | + # garbage collector detailed in https://github.com/python/cpython/issues/97922.) | ||
| 964 | + if os.name == "nt" and sys.version_info >= (3, 12): | ||
| 965 | + gc.collect() | ||
| 966 | + | ||
| 961 | 967 | new_path = "renamed/myname" | |
| 962 | 968 | assert sm.move(new_path).name == new_path | |
| 963 | 969 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments