[qmtest] kudos, interface, examples
eichin at metacarta.com
eichin at metacarta.com
Fri Dec 13 21:18:36 UTC 2002
> I see that this works much better at the command-line than from the
> GUI; in the GUI no information about the failing resource is presented.
> In the command-line interface, a full trace-back is provided. I've
Ohh, yes, I see now -- "qmtest run --format full" gives a nice
"--- RESOURCES THAT DID NOT PASS ----------------------------------------------"
section. Excellent.
Is this a good place to send code snippets? As much for practice as
anything else, I tossed together a "URLField" derived from TextField,
so I could click on the url in a resource-instance page to check it.
"share & enjoy" :-)
_Mark_ <eichin at metacarta.com>
import qm.common
from qm.fields import *
class URLField(TextField):
"""A text field containing a URL."""
class_name = "url_field.URLField"
def GetTypeDescription(self):
return "a URL"
def FormatValueAsHtml(self, value, style, name=None):
if style != "new" and style != "edit":
return '<a href="%s">%s</a>' % (value, value)
else:
return TextField.FormatValueAsHtml(self, value, style, name)
More information about the qmtest
mailing list