#22751: fix test___all__ warning about modified environment in the tests. Patch by Michael Cetrulo.

This commit is contained in:
Ezio Melotti 2014-11-02 19:08:35 +02:00
parent 21a2350a83
commit 009352aefd
2 changed files with 5 additions and 3 deletions

View File

@ -75,13 +75,14 @@ class AllTest(unittest.TestCase):
# rlcompleter needs special consideration; it imports readline which # rlcompleter needs special consideration; it imports readline which
# initializes GNU readline which calls setlocale(LC_CTYPE, "")... :-( # initializes GNU readline which calls setlocale(LC_CTYPE, "")... :-(
import locale
locale_tuple = locale.getlocale(locale.LC_CTYPE)
try: try:
import rlcompleter import rlcompleter
import locale
except ImportError: except ImportError:
pass pass
else: finally:
locale.setlocale(locale.LC_CTYPE, 'C') locale.setlocale(locale.LC_CTYPE, locale_tuple)
ignored = [] ignored = []
failed_imports = [] failed_imports = []

View File

@ -218,6 +218,7 @@ Per Cederqvist
Matej Cepl Matej Cepl
Carl Cerecke Carl Cerecke
Octavian Cerna Octavian Cerna
Michael Cetrulo
Dave Chambers Dave Chambers
Pascal Chambon Pascal Chambon
John Chandler John Chandler