summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.py
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-11-29 16:14:27 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-11-29 16:14:27 (GMT)
commitc8e032006a608f14f9463f06f4d466fd367b37f3 (patch)
treefeb41266b17d36bf1f47c438db5cac11eb696d16 /Lib/test/regrtest.py
parentaa35b0032235b6b935da0f08f79bba7296ced5fc (diff)
parenta74f8ef419d2c7c5f398a80165f8d8fd5e4d7b8e (diff)
downloadcpython-c8e032006a608f14f9463f06f4d466fd367b37f3.zip
cpython-c8e032006a608f14f9463f06f4d466fd367b37f3.tar.gz
cpython-c8e032006a608f14f9463f06f4d466fd367b37f3.tar.bz2
Merge 3.2
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-xLib/test/regrtest.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index cfae1f0..af11416 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -177,6 +177,7 @@ import packaging.database
import platform
import random
import re
+import shutil
import signal
import sys
import sysconfig
@@ -1042,6 +1043,23 @@ class saved_test_environment:
asyncore.close_all(ignore_all=True)
asyncore.socket_map.update(saved_map)
+ def get_shutil_archive_formats(self):
+ # we could call get_archives_formats() but that only returns the
+ # registry keys; we want to check the values too (the functions that
+ # are registered)
+ return shutil._ARCHIVE_FORMATS, shutil._ARCHIVE_FORMATS.copy()
+ def restore_shutil_archive_formats(self, saved):
+ shutil._ARCHIVE_FORMATS = saved[0]
+ shutil._ARCHIVE_FORMATS.clear()
+ shutil._ARCHIVE_FORMATS.update(saved[1])
+
+ def get_shutil_unpack_formats(self):
+ return shutil._UNPACK_FORMATS, shutil._UNPACK_FORMATS.copy()
+ def restore_shutil_unpack_formats(self, saved):
+ shutil._UNPACK_FORMATS = saved[0]
+ shutil._UNPACK_FORMATS.clear()
+ shutil._UNPACK_FORMATS.update(saved[1])
+
def get_logging__handlers(self):
# _handlers is a WeakValueDictionary
return id(logging._handlers), logging._handlers, logging._handlers.copy()