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
9bcfacd4
Commit
9bcfacd4
authored
May 24, 2011
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #12167: packaging.tests.test_dist unloads the temporary module
Fix a reference leak.
parent
79d1b1ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
Lib/packaging/tests/test_dist.py
Lib/packaging/tests/test_dist.py
+2
-0
No files found.
Lib/packaging/tests/test_dist.py
View file @
9bcfacd4
...
@@ -13,6 +13,7 @@ from packaging.errors import PackagingModuleError, PackagingOptionError
...
@@ -13,6 +13,7 @@ from packaging.errors import PackagingModuleError, PackagingOptionError
from
packaging.tests
import
TESTFN
,
captured_stdout
from
packaging.tests
import
TESTFN
,
captured_stdout
from
packaging.tests
import
support
,
unittest
from
packaging.tests
import
support
,
unittest
from
packaging.tests.support
import
create_distribution
from
packaging.tests.support
import
create_distribution
from
test.support
import
unload
class
test_dist
(
Command
):
class
test_dist
(
Command
):
...
@@ -224,6 +225,7 @@ class DistributionTestCase(support.TempdirManager,
...
@@ -224,6 +225,7 @@ class DistributionTestCase(support.TempdirManager,
# prepare the call recorders
# prepare the call recorders
sys
.
path
.
append
(
temp_home
)
sys
.
path
.
append
(
temp_home
)
self
.
addCleanup
(
sys
.
path
.
remove
,
temp_home
)
self
.
addCleanup
(
sys
.
path
.
remove
,
temp_home
)
self
.
addCleanup
(
unload
,
module_name
)
record
=
__import__
(
module_name
).
record
record
=
__import__
(
module_name
).
record
old_run
=
cmd
.
run
old_run
=
cmd
.
run
...
...
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