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
d656354d
Commit
d656354d
authored
May 20, 2010
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test_warnings on Windows (don't change current directory)
parent
148051a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
Lib/test/test_warnings.py
Lib/test/test_warnings.py
+5
-7
No files found.
Lib/test/test_warnings.py
View file @
d656354d
...
...
@@ -4,7 +4,6 @@ import os
from
io
import
StringIO
import
sys
import
unittest
import
shutil
import
tempfile
import
subprocess
from
test
import
support
...
...
@@ -678,12 +677,11 @@ class BootstrapTest(unittest.TestCase):
# "import encodings" emits a warning whereas the warnings is not loaded
# or not completly loaded (warnings imports indirectly encodings by
# importing linecache) yet
old_cwd
=
os
.
getcwd
()
cwd
=
tempfile
.
mkdtemp
()
try
:
cwd
=
tempfile
.
mkdtemp
()
encodings
=
os
.
path
.
join
(
cwd
,
'encodings'
)
os
.
mkdir
(
encodings
)
try
:
os
.
chdir
(
cwd
)
os
.
mkdir
(
'encodings'
)
env
=
os
.
environ
.
copy
()
env
[
'PYTHONPATH'
]
=
cwd
...
...
@@ -697,9 +695,9 @@ class BootstrapTest(unittest.TestCase):
env
=
env
)
self
.
assertEqual
(
retcode
,
0
)
finally
:
shutil
.
rmtree
(
cwd
)
os
.
rmdir
(
encodings
)
finally
:
os
.
chdir
(
old_
cwd
)
os
.
rmdir
(
cwd
)
def
test_main
():
py_warnings
.
onceregistry
.
clear
()
...
...
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