|
From: Bob T. <ta...@re...> - 2005-11-09 23:55:31
|
How do you run the tests in formencode-0.2.2 ? -- Bob Tanner <ta...@re...> | Phone : (952)943-8700 http://www.real-time.com, Minnesota, Linux | Fax : (952)943-8500 Key fingerprint = AB15 0BDF BCDE 4369 5B42 1973 7CF1 A709 2CC1 B288 |
|
From: Ian B. <ia...@co...> - 2005-11-09 23:57:28
|
Bob Tanner wrote: > How do you run the tests in formencode-0.2.2 ? It uses py.test: http://codespeak.net/py/current/doc/test.html If you run "py.test tests/" from the root of the project, they'll all run. -- Ian Bicking / ia...@co... / http://blog.ianbicking.org |
|
From: Bob T. <ta...@re...> - 2005-11-10 00:02:11
|
On Wednesday 09 November 2005 05:56 pm, Ian Bicking wrote: > Bob Tanner wrote: > > How do you run the tests in formencode-0.2.2 ? > > It uses py.test: http://codespeak.net/py/current/doc/test.html > > If you run "py.test tests/" from the root of the project, they'll all run. Wow, great turn around time for a response. Did I miss this tidbit in the documentation or on the web site? Also, I looked, but didn't find a debian package. Is there a debian package? If not, is it ok to create one? -- Bob Tanner <ta...@re...> | Phone : (952)943-8700 http://www.real-time.com, Minnesota, Linux | Fax : (952)943-8500 Key fingerprint = AB15 0BDF BCDE 4369 5B42 1973 7CF1 A709 2CC1 B288 |
|
From: Ian B. <ia...@co...> - 2005-11-10 00:05:52
|
Bob Tanner wrote: > On Wednesday 09 November 2005 05:56 pm, Ian Bicking wrote: > >>Bob Tanner wrote: >> >>>How do you run the tests in formencode-0.2.2 ? >> >>It uses py.test: http://codespeak.net/py/current/doc/test.html >> >>If you run "py.test tests/" from the root of the project, they'll all run. > > > Wow, great turn around time for a response. > > Did I miss this tidbit in the documentation or on the web site? I'm not sure; probably it is missing. > Also, I looked, but didn't find a debian package. Is there a debian package? > If not, is it ok to create one? I'm not sure either... I think there are rpms, and I think maybe debs for SQLObject. There's a program that might be useful for building a deb: http://easy-deb.sourceforge.net/ -- what I'd really like, but I don't think easy-deb does, it to be able to build an deb with "python setup.py bdist_deb" (like sdist, bdist_egg, etc). And rpms... anyway, if you or anyone can figure out how that works and perhaps a patch, I can start doing this as part of releases (probably uploading to the Cheese Shop). -- Ian Bicking / ia...@co... / http://blog.ianbicking.org |
|
From: Bob T. <ta...@re...> - 2005-11-13 02:41:33
|
Ian Bicking wrote: > Bob Tanner wrote: >> How do you run the tests in formencode-0.2.2 ? > > It uses py.test: http://codespeak.net/py/current/doc/test.html > > If you run "py.test tests/" from the root of the project, they'll all run. > Got py.test installed. Confirmed that py.test's testsuite all passes, but then I try to run the testsuite for formencode-0.2.2 I'm still having problems. The py <re unknown> seems suspicious, but I get the same message when I run py.test's testsuite too. % py.test tests/ ============================= test process starts ============================== testing-mode: inprocess executable: /usr/bin/python2.4 (2.4.2-final-0) using py lib: /usr/lib/python2.4/site-packages/py <rev unknown> tests/test_doctest_xml_compare.py FAILED TO LOAD MODULE tests/test_doctests.py FAILED TO LOAD MODULE tests/test_formgen.py FAILED TO LOAD MODULE tests/test_htmlfill.py FAILED TO LOAD MODULE tests/test_htmlgen.py FAILED TO LOAD MODULE tests/test_schema.py FAILED TO LOAD MODULE ________________________________________________________________________________ _________________________________ entrypoint: _________________________________ E import formencode.doctest_xml_compare as dxml > ImportError: No module named formencode.doctest_xml_compare [/home/tanner/projects/real-time/debian/turbogears/FormEncode/python-formencode-0.2.2/tests/test_doctest_xml_compare.py:1] ________________________________________________________________________________ _________________________________ entrypoint: _________________________________ import os, sys if __name__ == '__main__': base = os.path.dirname(os.path.dirname( os.path.dirname(os.path.abspath(__file__)))) sys.path.append(base) try: import doctest doctest.OutputChecker except AttributeError: import formencode.util.doctest24 as doctest E from formencode import doctest_xml_compare > ImportError: No module named formencode [/home/tanner/projects/real-time/debian/turbogears/FormEncode/python-formencode-0.2.2/tests/test_doctests.py:13] ________________________________________________________________________________ _________________________________ entrypoint: _________________________________ try: import doctest doctest.OutputChecker except AttributeError: import formencode.util.doctest24 as doctest E from formencode import formgen > ImportError: No module named formencode [/home/tanner/projects/real-time/debian/turbogears/FormEncode/python-formencode-0.2.2/tests/test_formgen.py:6] ________________________________________________________________________________ _________________________________ entrypoint: _________________________________ import sys import os import re base_dir = os.path.dirname(os.path.dirname(os.path.dirname( os.path.abspath(__file__)))) if base_dir not in sys.path: sys.path.insert(0, base_dir) E import formencode > ImportError: No module named formencode [/home/tanner/projects/real-time/debian/turbogears/FormEncode/python-formencode-0.2.2/tests/test_htmlfill.py:9] ________________________________________________________________________________ _________________________________ entrypoint: _________________________________ E from formencode.htmlgen import html > ImportError: No module named formencode.htmlgen [/home/tanner/projects/real-time/debian/turbogears/FormEncode/python-formencode-0.2.2/tests/test_htmlgen.py:1] ________________________________________________________________________________ _________________________________ entrypoint: _________________________________ E from formencode import validators, foreach > ImportError: No module named formencode [/home/tanner/projects/real-time/debian/turbogears/FormEncode/python-formencode-0.2.2/tests/test_schema.py:1] ________________________________________________________________________________ =================== tests finished: 6 failed in 0.14 seconds =================== -- Bob Tanner <ta...@re...> | Phone : (952)943-8700 http://www.real-time.com, Minnesota, Linux | Fax : (952)943-8500 Key fingerprint = AB15 0BDF BCDE 4369 5B42 1973 7CF1 A709 2CC1 B288 |
|
From: Bob T. <ta...@re...> - 2005-11-13 03:30:55
|
Bob Tanner wrote:
> % py.test tests/
> ============================= test process starts
> ==============================
> testing-mode: inprocess
> executable: /usr/bin/python2.4 (2.4.2-final-0)
> using py lib: /usr/lib/python2.4/site-packages/py <rev unknown>
>
> tests/test_doctest_xml_compare.py FAILED TO LOAD MODULE
> tests/test_doctests.py FAILED TO LOAD MODULE
> tests/test_formgen.py FAILED TO LOAD MODULE
> tests/test_htmlfill.py FAILED TO LOAD MODULE
> tests/test_htmlgen.py FAILED TO LOAD MODULE
> tests/test_schema.py FAILED TO LOAD MODULE
Got a little further.
$ export PYTHONPATH="."
$ py.test tests/
============================= test process starts
==============================
testing-mode: inprocess
executable: /usr/bin/python2.4 (2.4.2-final-0)
using py lib: /usr/lib/python2.4/site-packages/py <rev unknown>
tests/test_cc_validator.py[1] .
tests/test_context.py[3] ...
tests/test_doctest_xml_compare.py[1] .
tests/test_doctests.py[0]
tests/test_formgen.py FAILED TO LOAD MODULE
tests/test_htmlfill.py[5] F....
tests/test_htmlgen.py[7] .......
tests/test_makeform.py FAILED TO LOAD MODULE
tests/test_schema.py[10] ..........
________________________________________________________________________________
_________________________________ entrypoint:
_________________________________
try:
import doctest
doctest.OutputChecker
except AttributeError:
import formencode.util.doctest24 as doctest
> from formencode import formgen
[/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/tests/test_formgen.py:6]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
import fields
import pkg_resources
> pkg_resources.require('RuleDispatch')
[/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/formencode/formgen.py:5]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
> [failure to get at sourcelines from
<TracebackEntry /home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/build/bdist.linux-i686/egg/pkg_resources.py:503>]
[/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/build/bdist.linux-i686/egg/pkg_resources.py:503]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
E [failure to get at sourcelines from
<TracebackEntry /home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/build/bdist.linux-i686/egg/pkg_resources.py:483>]
> DistributionNotFound: RuleDispatch
[/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/build/bdist.linux-i686/egg/pkg_resources.py:483]
________________________________________________________________________________
_______________________ entrypoint: test_inputoutput[0]
________________________
def run_filename(filename):
f = open(filename)
content = f.read()
f.close()
parts = re.split(r'---*', content)
template = parts[0]
expected = parts[1]
if len(parts) == 3:
data_content = parts[2].strip()
elif len(parts) > 3:
print parts[3:]
assert 0, "Too many sections"
else:
data_content = ''
namespace = {}
if data_content:
exec data_content in namespace
data = namespace.copy()
data['defaults'] = data.get('defaults', {})
if data.has_key('check'):
checker = data['check']
del data['check']
else:
def checker(p, s):
pass
for name in data.keys():
if name.startswith('_') or hasattr(__builtins__, name):
del data[name]
listener = htmlfill_schemabuilder.SchemaBuilder()
p = htmlfill.FillingParser(listener=listener, **data)
> p.feed(template)
[/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/tests/test_htmlfill.py:54]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
def feed(self, data):
self.source = data
self.lines = data.split('\n')
self.source_pos = 1, 0
if self.listener:
self.listener.reset()
> HTMLParser.HTMLParser.feed(self, data)
[/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/formencode/htmlfill.py:113]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
def feed(self, data):
"""Feed data to the parser.
Call this as often as you want, with as little or as much text
as you want (may include '\n').
"""
self.rawdata = self.rawdata + data
> self.goahead(0)
[/usr/lib/python2.4/HTMLParser.py:108]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
def goahead(self, end):
rawdata = self.rawdata
i = 0
n = len(rawdata)
while i < n:
match = self.interesting.search(rawdata, i) # < or &
if match:
j = match.start()
else:
j = n
if i < j: self.handle_data(rawdata[i:j])
i = self.updatepos(i, j)
if i == n: break
startswith = rawdata.startswith
if startswith('<', i):
if starttagopen.match(rawdata, i): # < + letter
> k = self.parse_starttag(i)
[/usr/lib/python2.4/HTMLParser.py:148]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
def parse_starttag(self, i):
self.__starttag_text = None
endpos = self.check_for_whole_start_tag(i)
if endpos < 0:
return endpos
rawdata = self.rawdata
self.__starttag_text = rawdata[i:endpos]
# Now parse the data between i+1 and j into a tag and attrs
attrs = []
match = tagfind.match(rawdata, i+1)
assert match, 'unexpected call to parse_starttag()'
k = match.end()
self.lasttag = tag = rawdata[i+1:k].lower()
while k < endpos:
m = attrfind.match(rawdata, k)
if not m:
break
attrname, rest, attrvalue = m.group(1, 2, 3)
if not rest:
attrvalue = None
elif attrvalue[:1] == '\'' == attrvalue[-1:] or \
attrvalue[:1] == '"' == attrvalue[-1:]:
attrvalue = attrvalue[1:-1]
attrvalue = self.unescape(attrvalue)
attrs.append((attrname.lower(), attrvalue))
k = m.end()
end = rawdata[k:endpos].strip()
if end not in (">", "/>"):
lineno, offset = self.getpos()
if "\n" in self.__starttag_text:
lineno = lineno + self.__starttag_text.count("\n")
offset = len(self.__starttag_text) \
- self.__starttag_text.rfind("\n")
else:
offset = offset + len(self.__starttag_text)
self.error("junk characters in start tag: %r"
% (rawdata[k:endpos][:20],))
if end.endswith('/>'):
# XHTML-style empty tag: <span attr="value" />
self.handle_startendtag(tag, attrs)
else:
> self.handle_starttag(tag, attrs)
[/usr/lib/python2.4/HTMLParser.py:268]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
def handle_starttag(self, tag, attrs, startend=False):
self.write_pos()
if tag == 'input':
self.handle_input(attrs, startend)
elif tag == 'textarea':
self.handle_textarea(attrs)
elif tag == 'select':
self.handle_select(attrs)
elif tag == 'option':
self.handle_option(attrs)
return
elif tag == 'form:error':
> self.handle_error(attrs)
[/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/formencode/htmlfill.py:161]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
def handle_error(self, attrs):
name = self.get_attr(attrs, 'name')
formatter = self.get_attr(attrs, 'format') or 'default'
if name is None:
name = self.in_error
assert name is not None, (
"Name attribute in <form:error> required if not contained in "
"<form:iferror> (%i:%i)" % self.getpos())
error = self.errors.get(name, '')
if error:
> error = self.error_formatters[formatter](error)
[/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/formencode/htmlfill.py:216]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
def escape_formatter(error):
E return html_quote(error, 1)
> TypeError: html_quote() takes exactly 1 argument (2 given)
[/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/formencode/htmlfill.py:41]
- - - - - - - - - - - test_htmlfill.py: recorded stdout - - - - - - - - - -
- -
>>>> /home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/formencode/__init__.pyc
________________________________________________________________________________
_________________________________ entrypoint:
_________________________________
from sqlobject import *
> from formencode.formgen import makeform
[/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/tests/test_makeform.py:3]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
import fields
import pkg_resources
> pkg_resources.require('RuleDispatch')
[/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/formencode/formgen.py:5]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
> [failure to get at sourcelines from
<TracebackEntry /home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/build/bdist.linux-i686/egg/pkg_resources.py:503>]
[/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/build/bdist.linux-i686/egg/pkg_resources.py:503]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
E [failure to get at sourcelines from
<TracebackEntry /home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/build/bdist.linux-i686/egg/pkg_resources.py:483>]
> DistributionNotFound: RuleDispatch
[/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/build/bdist.linux-i686/egg/pkg_resources.py:483]
________________________________________________________________________________
============= tests finished: 26 passed, 3 failed in 0.76 seconds
============
--
Bob Tanner <ta...@re...> | Phone : (952)943-8700
http://www.real-time.com, Minnesota, Linux | Fax : (952)943-8500
Key fingerprint = AB15 0BDF BCDE 4369 5B42 1973 7CF1 A709 2CC1 B288
|
|
From: Ian B. <ia...@co...> - 2005-11-13 04:40:49
|
Bob Tanner wrote: > Bob Tanner wrote: > > >>% py.test tests/ >>============================= test process starts >>============================== >>testing-mode: inprocess >>executable: /usr/bin/python2.4 (2.4.2-final-0) >>using py lib: /usr/lib/python2.4/site-packages/py <rev unknown> >> >>tests/test_doctest_xml_compare.py FAILED TO LOAD MODULE >>tests/test_doctests.py FAILED TO LOAD MODULE >>tests/test_formgen.py FAILED TO LOAD MODULE >>tests/test_htmlfill.py FAILED TO LOAD MODULE >>tests/test_htmlgen.py FAILED TO LOAD MODULE >>tests/test_schema.py FAILED TO LOAD MODULE > > > Got a little further. > $ export PYTHONPATH="." > $ py.test tests/ Oops, I knew there was someone I was forgetting... I checked in a fix to tests/conftest.py that should make the PYTHONPATH setting unnecessary. > E [failure to get at sourcelines from > <TracebackEntry /home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/build/bdist.linux-i686/egg/pkg_resources.py:483>] > >> DistributionNotFound: RuleDispatch This test requires RuleDispatch (the code itself is somewhat experimental): easy_install -Zf http://peak.telecommunity.com/snapshots/ RuleDispatch The other failures might be actual errors. -- Ian Bicking | ia...@co... | http://blog.ianbicking.org |
|
From: Bob T. <ta...@re...> - 2005-11-13 04:42:42
|
On Saturday 12 November 2005 10:40 pm, you wrote: > Oops, I knew there was someone I was forgetting... > > I checked in a fix to tests/conftest.py that should make the PYTHONPATH > setting unnecessary. Great, I'll snarf the patch and apply it to my debian package. > >> =A0DistributionNotFound: RuleDispatch > > This test requires RuleDispatch (the code itself is somewhat experimental= ): My fault for missing that. I have a debian package for this as well. Also,= =20 looks like it need sqlite. =2D-=20 Bob Tanner <ta...@re...> | Phone : (952)943-8700 http://www.real-time.com, Minnesota, Linux | Fax : (952)943-8500 Key fingerprint =3D AB15 0BDF BCDE 4369 5B42 1973 7CF1 A709 2CC1 B288 |
|
From: Ian B. <ia...@co...> - 2005-11-13 04:47:58
|
Bob Tanner wrote: > On Saturday 12 November 2005 10:40 pm, you wrote: > >>Oops, I knew there was someone I was forgetting... >> >>I checked in a fix to tests/conftest.py that should make the PYTHONPATH >>setting unnecessary. > > > Great, I'll snarf the patch and apply it to my debian package. > > >>>> DistributionNotFound: RuleDispatch >> >>This test requires RuleDispatch (the code itself is somewhat experimental): > > > My fault for missing that. I have a debian package for this as well. Also, > looks like it need sqlite. The test uses SQLObject, but the package itself does not. And like I said, the code is rather experimental, so I don't know that RuleDispatch should become a requirements. Maybe a suggestion. -- Ian Bicking | ia...@co... | http://blog.ianbicking.org |
|
From: Bob T. <ta...@re...> - 2005-11-13 05:39:12
Attachments:
FormEncode-0.3-testsuite.txt
|
On Saturday 12 November 2005 10:40 pm, Ian Bicking wrote: > Oops, I knew there was someone I was forgetting... > > I checked in a fix to tests/conftest.py that should make the PYTHONPATH > setting unnecessary. Patch for tests/conftest.py fixed this problem, now down to 2 failed unit tests. -- Bob Tanner <ta...@re...> | Phone : (952)943-8700 http://www.real-time.com, Minnesota, Linux | Fax : (952)943-8500 Key fingerprint = AB15 0BDF BCDE 4369 5B42 1973 7CF1 A709 2CC1 B288 |
|
From: Ian B. <ia...@co...> - 2005-11-13 06:18:19
|
I committed a fix for one. The other I think is a remnant of TDD, and
never has passed. I commented it out for now.
Bob Tanner wrote:
> On Saturday 12 November 2005 10:40 pm, Ian Bicking wrote:
>
>>Oops, I knew there was someone I was forgetting...
>>
>>I checked in a fix to tests/conftest.py that should make the PYTHONPATH
>>setting unnecessary.
>
>
> Patch for tests/conftest.py fixed this problem, now down to 2 failed unit
> tests.
>
>
>
> ------------------------------------------------------------------------
>
> ============================= test process starts =============================
> testing-mode: inprocess
> executable: /usr/bin/python2.4 (2.4.2-final-0)
> using py lib: /usr/lib/python2.4/site-packages/py <rev unknown>
>
> docs/test_docs.py FAILED TO LOAD MODULE
> tests/test_cc_validator.py[1] .
> tests/test_context.py[3] ...
> tests/test_doctest_xml_compare.py[1] .
> tests/test_doctests.py[0]
> tests/test_formgen.py[0]
> tests/test_htmlfill.py[5] F....
> tests/test_htmlgen.py[7] .......
> tests/test_makeform.py[3] ..F
> tests/test_schema.py[10] ..........
>
> _______________________________________________________________________________
> ________________________________ entrypoint: _________________________________
>
> def runtraced(self, colitem):
> if self.shouldclose():
> raise Exit, "received external close signal"
>
> outcome = None
> colitem.startcapture()
> try:
> self.start(colitem)
> try:
> try:
> if colitem._stickyfailure:
> raise colitem._stickyfailure
>
>> outcome = self.run(colitem)
>
>
> [/usr/lib/python2.4/site-packages/py/test/session.py:74]
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> def run(self, colitem):
> if self.config.option.collectonly and isinstance(colitem, py.test.Item):
> return
> if isinstance(colitem, py.test.Item):
> self.skipbykeyword(colitem)
>
>> res = colitem.run()
>
>
> [/usr/lib/python2.4/site-packages/py/test/session.py:97]
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> def run(self):
>
>> self._prepare()
>
>
> [/usr/lib/python2.4/site-packages/py/test/collect.py:203]
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> def _prepare(self):
> if not hasattr(self, '_name2items'):
> ex = getattr(self, '_name2items_exception', None)
> if ex is not None:
> raise ex[0], ex[1], ex[2]
> try:
>
>> self._name2items = self.buildname2items()
>
>
> [/usr/lib/python2.4/site-packages/py/test/collect.py:189]
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> def buildname2items(self):
> d = {}
> for p in self.fspath.listdir():
>
>> x = self.makeitem(p.basename, self.filefilter, self.recfilter)
>
>
> [/usr/lib/python2.4/site-packages/py/test/collect.py:239]
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> def makeitem(self, basename, filefilter=None, recfilter=None):
> p = self.fspath.join(basename)
> if p.check(file=1) and (not filefilter or filefilter(p)):
> return self.Module(p, parent=self)
> elif p.check(dir=1) and (not recfilter or recfilter(p)):
>
>> Directory = py.test.Config.getvalue('Directory', p)
>
>
> [/usr/lib/python2.4/site-packages/py/test/collect.py:249]
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> def getvalue(cls, name, path=None, default=dummy, trydefaultconfig=True):
> """ return 'name' value looked up from the first conftest file
> found up the path (including the path itself).
> """
> configpaths = guessconfigpaths(path)
> if trydefaultconfig:
> configpaths.append(defaultconfig)
> for p in configpaths:
>
>> mod = importconfig(p)
>
>
> [/usr/lib/python2.4/site-packages/py/test/config.py:48]
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> def importconfig(configpath):
> if not configpath.dirpath('__init__.py').check(file=1):
> # HACK: we don't want a "globally" imported conftest.py,
> # prone to conflicts and subtle problems
> modname = str(configpath).replace('.', configpath.sep)
> return configpath.pyimport(modname=modname)
> else:
>
>> return configpath.pyimport()
>
>
> [/usr/lib/python2.4/site-packages/py/test/config.py:209]
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> def pyimport(self, modname=None, ensuresyspath=True):
> """ return path as an imported python module.
> if modname is None, look for the containing package
> and construct an according module name.
> The module will be put/looked up in sys.modules.
> """
> if not self.check():
> raise py.error.ENOENT(self)
> #print "trying to import", self
> pkgpath = None
> if modname is None:
> pkgpath = self.pypkgpath()
> if pkgpath is not None:
> if ensuresyspath:
> self._prependsyspath(pkgpath.dirpath())
> pkg = __import__(pkgpath.basename, None, None, [])
> E assert py.path.local(pkg.__file__).relto(pkgpath)
>
>> assert ''
>
> + where '' = local('/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/formencode/__init__.pyc').relto(local('/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/build/lib/formencode'))
> + where local('/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/formencode/__init__.pyc') = <class 'py.path.local'>('/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/formencode/__init__.pyc')
> + where <class 'py.path.local'> = <Module 'py.path'>.local
> + where <Module 'py.path'> = py.path
> + and '/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/formencode/__init__.pyc' = <module 'formencode' from '/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/formencode/__init__.pyc'>.__file__
>
> [/usr/lib/python2.4/site-packages/py/path/local/local.py:375]
> _______________________________________________________________________________
> ________________________________ entrypoint: _________________________________
>
> import os, sys
> from py.compat import doctest
> import pkg_resources
>
>> pkg_resources.require('FormEncode[testing]')
>
>
> [/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/docs/test_docs.py:4]
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
>
>> [failure to get at sourcelines from <TracebackEntry /home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/build/bdist.linux-i686/egg/pkg_resources.py:503>]
>
>
> [/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/build/bdist.linux-i686/egg/pkg_resources.py:503]
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> E [failure to get at sourcelines from <TracebackEntry /home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/build/bdist.linux-i686/egg/pkg_resources.py:483>]
>
>> DistributionNotFound: elementtree
>
>
> [/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/build/bdist.linux-i686/egg/pkg_resources.py:483]
> _______________________________________________________________________________
> _______________________ entrypoint: test_inputoutput[0] _______________________
>
> def run_filename(filename):
> f = open(filename)
> content = f.read()
> f.close()
> parts = re.split(r'---*', content)
> template = parts[0]
> expected = parts[1]
> if len(parts) == 3:
> data_content = parts[2].strip()
> elif len(parts) > 3:
> print parts[3:]
> assert 0, "Too many sections"
> else:
> data_content = ''
> namespace = {}
> if data_content:
> exec data_content in namespace
> data = namespace.copy()
> data['defaults'] = data.get('defaults', {})
> if data.has_key('check'):
> checker = data['check']
> del data['check']
> else:
> def checker(p, s):
> pass
> for name in data.keys():
> if name.startswith('_') or hasattr(__builtins__, name):
> del data[name]
> listener = htmlfill_schemabuilder.SchemaBuilder()
> p = htmlfill.FillingParser(listener=listener, **data)
>
>> p.feed(template)
>
>
> [/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/tests/test_htmlfill.py:54]
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> def feed(self, data):
> self.source = data
> self.lines = data.split('\n')
> self.source_pos = 1, 0
> if self.listener:
> self.listener.reset()
>
>> HTMLParser.HTMLParser.feed(self, data)
>
>
> [/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/formencode/htmlfill.py:113]
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> def feed(self, data):
> """Feed data to the parser.
>
> Call this as often as you want, with as little or as much text
> as you want (may include '\n').
> """
> self.rawdata = self.rawdata + data
>
>> self.goahead(0)
>
>
> [/usr/lib/python2.4/HTMLParser.py:108]
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> def goahead(self, end):
> rawdata = self.rawdata
> i = 0
> n = len(rawdata)
> while i < n:
> match = self.interesting.search(rawdata, i) # < or &
> if match:
> j = match.start()
> else:
> j = n
> if i < j: self.handle_data(rawdata[i:j])
> i = self.updatepos(i, j)
> if i == n: break
> startswith = rawdata.startswith
> if startswith('<', i):
> if starttagopen.match(rawdata, i): # < + letter
>
>> k = self.parse_starttag(i)
>
>
> [/usr/lib/python2.4/HTMLParser.py:148]
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> def parse_starttag(self, i):
> self.__starttag_text = None
> endpos = self.check_for_whole_start_tag(i)
> if endpos < 0:
> return endpos
> rawdata = self.rawdata
> self.__starttag_text = rawdata[i:endpos]
>
> # Now parse the data between i+1 and j into a tag and attrs
> attrs = []
> match = tagfind.match(rawdata, i+1)
> assert match, 'unexpected call to parse_starttag()'
> k = match.end()
> self.lasttag = tag = rawdata[i+1:k].lower()
>
> while k < endpos:
> m = attrfind.match(rawdata, k)
> if not m:
> break
> attrname, rest, attrvalue = m.group(1, 2, 3)
> if not rest:
> attrvalue = None
> elif attrvalue[:1] == '\'' == attrvalue[-1:] or \
> attrvalue[:1] == '"' == attrvalue[-1:]:
> attrvalue = attrvalue[1:-1]
> attrvalue = self.unescape(attrvalue)
> attrs.append((attrname.lower(), attrvalue))
> k = m.end()
>
> end = rawdata[k:endpos].strip()
> if end not in (">", "/>"):
> lineno, offset = self.getpos()
> if "\n" in self.__starttag_text:
> lineno = lineno + self.__starttag_text.count("\n")
> offset = len(self.__starttag_text) \
> - self.__starttag_text.rfind("\n")
> else:
> offset = offset + len(self.__starttag_text)
> self.error("junk characters in start tag: %r"
> % (rawdata[k:endpos][:20],))
> if end.endswith('/>'):
> # XHTML-style empty tag: <span attr="value" />
> self.handle_startendtag(tag, attrs)
> else:
>
>> self.handle_starttag(tag, attrs)
>
>
> [/usr/lib/python2.4/HTMLParser.py:268]
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> def handle_starttag(self, tag, attrs, startend=False):
> self.write_pos()
> if tag == 'input':
> self.handle_input(attrs, startend)
> elif tag == 'textarea':
> self.handle_textarea(attrs)
> elif tag == 'select':
> self.handle_select(attrs)
> elif tag == 'option':
> self.handle_option(attrs)
> return
> elif tag == 'form:error':
>
>> self.handle_error(attrs)
>
>
> [/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/formencode/htmlfill.py:161]
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> def handle_error(self, attrs):
> name = self.get_attr(attrs, 'name')
> formatter = self.get_attr(attrs, 'format') or 'default'
> if name is None:
> name = self.in_error
> assert name is not None, (
> "Name attribute in <form:error> required if not contained in "
> "<form:iferror> (%i:%i)" % self.getpos())
> error = self.errors.get(name, '')
> if error:
>
>> error = self.error_formatters[formatter](error)
>
>
> [/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/formencode/htmlfill.py:216]
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> def escape_formatter(error):
> E return html_quote(error, 1)
>
>> TypeError: html_quote() takes exactly 1 argument (2 given)
>
>
> [/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/formencode/htmlfill.py:41]
> - - - - - - - - - - - test_htmlfill.py: recorded stdout - - - - - - - - - - -
>
>>>>>/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/formencode/__init__.pyc
>
>
> _______________________________________________________________________________
> _________________________ entrypoint: test_simple[2] __________________________
>
> def xcmp(a, b):
> try:
> a = '<xml>%s</xml>' % a
> xml_a = make_xml(a)
> except:
> print prxml(a)
> raise
> try:
> b = '<xml>%s</xml>' % b
> xml_b = make_xml(b)
> except:
> print prxml(b)
> raise
> prxml(a)
> prxml(b)
> E assert xml_compare(xml_a, xml_b, reporter=printer)
>
>> assert xml_compare(<Element xml at -48807e74>, <Element xml at -48807354>, reporter=printer)
>
>
> [/home/tanner/projects/real-time/debian/turbogears/FormEncode/FormEncode-0.3/tests/test_makeform.py:30]
> - - - - - - - - - - - - - - [2]: recorded stdout - - - - - - - - - - - - - - -
> 1 <xml>name:<input name="name" type="text" /><br />address:<input name="address" type="text" /><br />city:<input name="city" type="text" /><br /></xml>
> 1 <xml>
> 2 name: <input type="text" name="name" value="Tom" /> <br />
> 3 address: <input type="text" name="address" value="123" /> <br />
> 4 city: <input type="text" name="city" value="Chicago" /> <br />
> 5 </xml>
> x2 has an attribute x1 is missing: value
> children 1 do not match: input
> children 1 do not match: xml
> x2 has an attribute x1 is missing: value
> children 1 do not match: input
> children 1 do not match: xml
>
> _______________________________________________________________________________
> ============= tests finished: 28 passed, 4 failed in 1.27 seconds =============
--
Ian Bicking | ia...@co... | http://blog.ianbicking.org
|