[Zope3-checkins] CVS: Zope3/utilities - runurl.py:1.5
Sidnei da Silva
sidnei@x3ng.com.br
Mon, 23 Jun 2003 13:17:08 -0400
Update of /cvs-repository/Zope3/utilities
In directory cvs.zope.org:/tmp/cvs-serv14183/utilities
Modified Files:
runurl.py
Log Message:
1. Whitespace cleanup. 2. Docstring fixing. 3. Modified DAV code and tests to append '/' to the path if the last element is 'dir-like'. 4. Support for MKCOL with tests + functional tests. 5. Refactored DAV functional tests into a base class for reusing
=== Zope3/utilities/runurl.py 1.4 => 1.5 ===
--- Zope3/utilities/runurl.py:1.4 Wed Jun 11 16:13:02 2003
+++ Zope3/utilities/runurl.py Mon Jun 23 13:17:07 2003
@@ -65,7 +65,7 @@
--build
Run from a build directory
-
+
$Id$
"""
@@ -78,7 +78,7 @@
argv = sys.argv
script = argv[0]
-
+
args = argv[1:]
try:
@@ -91,7 +91,7 @@
print __doc__ % {'script': script}
raise
-
+
basic = run = warm = profilef = database = config = hotshotf = None
stdin = ''
src = 'src'
@@ -108,7 +108,7 @@
from distutils.util import get_platform
PLAT_SPEC = "%s-%s" % (get_platform(), sys.version[0:3])
src = os.path.join("build", "lib.%s" % PLAT_SPEC)
-
+
elif name in ('-d', '--database'):
database = value
elif name in ('-c', '--config'):
@@ -132,9 +132,9 @@
name, value = arg.split('=', 1)
env[name]=value
- app = _doimport(script, src)
+ app = _doimport(script, src)
app = app.Application(database, config)
-
+
if warm:
_mainrun(app, path, basic, 1, stdin, env)
@@ -156,10 +156,10 @@
import marshal
marshal.dump(p.stats, open(hotshotf, 'w'))
print 'Wrote', hotshotf
-
+
else:
_mainrun(app, path, basic, run, stdin, env)
-
+
resultfmt = "elapsed: %.4f, cpu=%.4f, status=%s"
def _mainrun(app, path, basic, run, stdin, environment):
if run:
@@ -182,7 +182,7 @@
else:
print resultfmt % app.publish(path=path, basic=basic, stdin=stdin,
environment=environment)
-
+
def _doimport(script, src):
try: