diff options
author | Žiga Seilnacht <ziga.seilnacht@gmail.com> | 2007-04-09 19:10:29 +0000 |
---|---|---|
committer | Žiga Seilnacht <ziga.seilnacht@gmail.com> | 2007-04-09 19:10:29 +0000 |
commit | d5b3fed17d977c443f3bec770226a434e4334aa7 (patch) | |
tree | 45fdcc2a57054d5a2c9ef799ea0b16fff3101b7a /Lib/test | |
parent | aa7b16a888eb53fdc4d7f194f3d49e6e8fe3ac24 (diff) | |
download | cpython-git-d5b3fed17d977c443f3bec770226a434e4334aa7.tar.gz |
Patch #1695862: remove old test directory that causes test_urllib failures
on Windows buildbots. The change is a one time fix and will be removed
after a successful buildbot run.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_urllib.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py index 4851742aff..02f89c3756 100644 --- a/Lib/test/test_urllib.py +++ b/Lib/test/test_urllib.py @@ -547,6 +547,20 @@ class Pathname_Tests(unittest.TestCase): def test_main(): + # cleanup old test dir on Windows buildbots + old_test_path = test_support.TESTFN + ".2" + if os.path.isdir(old_test_path): + for root, dirs, files in os.walk(old_test_path, topdown=False): + for name in files: + os.remove(os.path.join(root, name)) + for name in dirs: + dirname = os.path.join(root, name) + if not os.path.islink(dirname): + os.rmdir(dirname) + else: + os.remove(dirname) + os.rmdir(old_test_path) + test_support.run_unittest( urlopen_FileTests, urlopen_HttpTests, |