Commits

Brett Cannon committed 830522c

Use shutil.rmtree() over os.rmdir() in case the tests get messy.

Comments (0)

Files changed (2)

 import operator
 import os
 import os.path
+import shutil
 import subprocess
 import sys
 import urllib.request
                                    regrtest_path])
         finally:
             # Clean up from the test run
-            os.rmdir('build')
+            shutil.rmtree('build')
         # Generate the HTML report
         print('Generating report ...')
         subprocess.call([executable, 'coveragepy', 'html', '-i', '--omit',
 #!/usr/bin/env python
 """Run CPython's test suite in the most rigorous way possible."""
 import multiprocessing
+import shutil
 import subprocess
 import sys
 import build_cpython
                          '-w', '-u', 'all', '-j',
                          str(multiprocessing.cpu_count())])
     finally:
-        os.rmdir('build')
+        shutil.rmtree('build')
 
 
 if __name__ == '__main__':