Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b8f02b5a
Commit
b8f02b5a
authored
Apr 29, 2012
by
Alexander Belopolsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed test_imaplib failure on Win
parent
407b3bd8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
Lib/test/support.py
Lib/test/support.py
+5
-1
No files found.
Lib/test/support.py
View file @
b8f02b5a
...
@@ -1027,12 +1027,16 @@ def run_with_locale(catstr, *locales):
...
@@ -1027,12 +1027,16 @@ def run_with_locale(catstr, *locales):
def
run_with_tz
(
tz
):
def
run_with_tz
(
tz
):
def
decorator
(
func
):
def
decorator
(
func
):
def
inner
(
*
args
,
**
kwds
):
def
inner
(
*
args
,
**
kwds
):
try
:
tzset
=
time
.
tzset
except
AttributeError
:
raise
unittest
.
SkipTest
(
"tzset required"
)
if
'TZ'
in
os
.
environ
:
if
'TZ'
in
os
.
environ
:
orig_tz
=
os
.
environ
[
'TZ'
]
orig_tz
=
os
.
environ
[
'TZ'
]
else
:
else
:
orig_tz
=
None
orig_tz
=
None
os
.
environ
[
'TZ'
]
=
tz
os
.
environ
[
'TZ'
]
=
tz
t
ime
.
t
zset
()
tzset
()
# now run the function, resetting the tz on exceptions
# now run the function, resetting the tz on exceptions
try
:
try
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment