mirror of
https://github.com/python/cpython.git
synced 2025-08-18 07:41:05 +00:00
Merged revisions 76952 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r76952 | tarek.ziade | 2009-12-21 00:23:34 +0100 (Mon, 21 Dec 2009) | 1 line Fixed #7552: fixed distutils.command.upload failure on very long passwords ........
This commit is contained in:
parent
59a389898e
commit
e220d67939
4 changed files with 112 additions and 4 deletions
|
@ -1,10 +1,10 @@
|
|||
"""Support code for distutils test cases."""
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import tempfile
|
||||
|
||||
from distutils import log
|
||||
|
||||
from distutils.dist import Distribution
|
||||
|
||||
class LoggingSilencer(object):
|
||||
|
||||
|
@ -55,6 +55,23 @@ class TempdirManager(object):
|
|||
finally:
|
||||
f.close()
|
||||
|
||||
def create_dist(self, pkg_name='foo', **kw):
|
||||
"""Will generate a test environment.
|
||||
|
||||
This function creates:
|
||||
- a Distribution instance using keywords
|
||||
- a temporary directory with a package structure
|
||||
|
||||
It returns the package directory and the distribution
|
||||
instance.
|
||||
"""
|
||||
tmp_dir = self.mkdtemp()
|
||||
pkg_dir = os.path.join(tmp_dir, pkg_name)
|
||||
os.mkdir(pkg_dir)
|
||||
dist = Distribution(attrs=kw)
|
||||
|
||||
return pkg_dir, dist
|
||||
|
||||
class DummyCommand:
|
||||
"""Class to store options for retrieval via set_undefined_options()."""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue