소스 검색

Do not delete the current working directory to avoid:

    WindowsError: [Error 32] The process cannot access the file because it
    is being used by another process: '...'
Risto Kankkunen 13 년 전
부모
커밋
20da491f3e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      dulwich/tests/__init__.py

+ 1 - 1
dulwich/tests/__init__.py

@@ -110,8 +110,8 @@ def tutorial_test_suite():
         test.__dulwich_tempdir = tempfile.mkdtemp()
         os.chdir(test.__dulwich_tempdir)
     def teardown(test):
-        shutil.rmtree(test.__dulwich_tempdir)
         os.chdir(test.__old_cwd)
+        shutil.rmtree(test.__dulwich_tempdir)
     return doctest.DocFileSuite(setUp=setup, tearDown=teardown,
         *tutorial_files)