def installPackageOnly(self, output=None):
"""Install a single source package.
-
+
If output is given it should be a file-like object and it
will receive a log of what happened."""
-
+
if self._dict.has_key('Post-install-command'):
return "%s: Installer package cannot have Post-install-command" % self.fullname()
if _cmd(output, '/tmp', self._dict['Pre-install-command']):
return "pre-install %s: running \"%s\" failed" % \
(self.fullname(), self._dict['Pre-install-command'])
-
+
self.beforeInstall()
installcmd = self._dict.get('Install-command')
if '%' in installcmd:
installcmd = installcmd % self.archiveFilename
else:
- installcmd = 'open \"%s\"' % self.archiveFilename
+ installcmd = 'open \"%s\"' % self.archiveFilename
if _cmd(output, "/tmp", installcmd):
return '%s: install command failed (use verbose for details)' % self.fullname()
return '%s: downloaded and opened. Install manually and restart Package Manager' % self.archiveFilename
in the standard library and test suite. This takes
a long time.
- subprocess Run all tests for the subprocess module.
+ subprocess Run all tests for the subprocess module.
To enable all resources except one, use '-uall,-<resource>'. For
example, to run all the tests except for the bsddb tests, give the
if test_support.is_resource_enabled("subprocess") and not mswindows:
max_handles = 1026 # too much for most UNIX systems
else:
- max_handles = 65
+ max_handles = 65
for i in range(max_handles):
p = subprocess.Popen([sys.executable, "-c",
"import sys;sys.stdout.write(sys.stdin.read())"],
self.failUnless(co.flush()) # Returns a zlib header
dco = zlib.decompressobj()
self.assertEqual(dco.flush(), "") # Returns nothing
-
+
def genblock(seed, length, step=1024, generator=random):
"""length-byte stream of random data from a seed (in step-byte blocks)."""