diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2014-11-02 17:08:35 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2014-11-02 17:08:35 (GMT) |
commit | 009352aefd6f744b018df5a6c0cb077e7f667b5b (patch) | |
tree | a2fcd7295b0de8d22501be0f3ec7ef945b1563ee | |
parent | 21a2350a83d52969f20556cb64e2865203a4d082 (diff) | |
download | cpython-009352aefd6f744b018df5a6c0cb077e7f667b5b.zip cpython-009352aefd6f744b018df5a6c0cb077e7f667b5b.tar.gz cpython-009352aefd6f744b018df5a6c0cb077e7f667b5b.tar.bz2 |
#22751: fix test___all__ warning about modified environment in the tests. Patch by Michael Cetrulo.
-rw-r--r-- | Lib/test/test___all__.py | 7 | ||||
-rw-r--r-- | Misc/ACKS | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/Lib/test/test___all__.py b/Lib/test/test___all__.py index 789f9fb..be6d79b 100644 --- a/Lib/test/test___all__.py +++ b/Lib/test/test___all__.py @@ -75,13 +75,14 @@ class AllTest(unittest.TestCase): # rlcompleter needs special consideration; it imports readline which # initializes GNU readline which calls setlocale(LC_CTYPE, "")... :-( + import locale + locale_tuple = locale.getlocale(locale.LC_CTYPE) try: import rlcompleter - import locale except ImportError: pass - else: - locale.setlocale(locale.LC_CTYPE, 'C') + finally: + locale.setlocale(locale.LC_CTYPE, locale_tuple) ignored = [] failed_imports = [] @@ -218,6 +218,7 @@ Per Cederqvist Matej Cepl Carl Cerecke Octavian Cerna +Michael Cetrulo Dave Chambers Pascal Chambon John Chandler |