diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-10-05 15:37:41 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-10-05 15:37:41 (GMT) |
commit | 047b7ae56628717160eb75e379e2bfdaa59dfc18 (patch) | |
tree | 5fce44a78310c538882fca71eea5e99a5f7b81c8 /Lib/test/test_threaded_import.py | |
parent | 8f437aac068e13fe8418bb0374baf4395e7b4994 (diff) | |
download | cpython-047b7ae56628717160eb75e379e2bfdaa59dfc18.zip cpython-047b7ae56628717160eb75e379e2bfdaa59dfc18.tar.gz cpython-047b7ae56628717160eb75e379e2bfdaa59dfc18.tar.bz2 |
Issue #22390: Remove files created by tests
Diffstat (limited to 'Lib/test/test_threaded_import.py')
-rw-r--r-- | Lib/test/test_threaded_import.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_threaded_import.py b/Lib/test/test_threaded_import.py index c7bfea0..192fa08 100644 --- a/Lib/test/test_threaded_import.py +++ b/Lib/test/test_threaded_import.py @@ -13,7 +13,8 @@ import time import shutil import unittest from test.support import ( - verbose, import_module, run_unittest, TESTFN, reap_threads, forget, unlink) + verbose, import_module, run_unittest, TESTFN, reap_threads, + forget, unlink, rmtree) threading = import_module('threading') def task(N, done, done_tasks, errors): @@ -222,6 +223,7 @@ class ThreadedImportTests(unittest.TestCase): f.write(code.encode('utf-8')) self.addCleanup(unlink, filename) self.addCleanup(forget, TESTFN) + self.addCleanup(rmtree, '__pycache__') importlib.invalidate_caches() __import__(TESTFN) |