Opened 15 years ago
Closed 15 years ago
#324 closed defect (fixed)
Test fails for Genshi-0.5.1 and Python 2.6.2
Reported by: | neurogeek@… | Owned by: | cmlenz |
---|---|---|---|
Priority: | trivial | Milestone: | 0.6 |
Component: | General | Version: | 0.5.1 |
Keywords: | Cc: | lmacken@… |
Description
Hello there,
When running python setup.py test in Genshi-0.5.1 using python-2.6.2, I get a test failed for genshi.template.eval.Undefined in here:
"""Represents a reference to an undefined variable. 221 227 >>> foo = Undefined('foo') 228 >>> bool(foo) 229 False 230 >>> list(foo) -----> This line fail test 231 [] 232 >>> print foo 233 undefined
Thanks,
Attachments (1)
Change History (6)
comment:1 Changed 15 years ago by lmacken@…
- Cc lmacken@… added
comment:2 Changed 15 years ago by cmlenz
- Milestone changed from 0.6 to 0.6.1
comment:3 Changed 15 years ago by rblank
Another (much less elegant) patch is in comment:6:ticket:370.
comment:4 Changed 15 years ago by cmlenz
- Milestone changed from 0.6.1 to 0.6
- Status changed from new to assigned
Issue raised again in #370.
comment:5 Changed 15 years ago by cmlenz
- Resolution set to fixed
- Status changed from assigned to closed
Applied in [1101]. Thanks and sorry for the wait!
Note: See
TracTickets for help on using
tickets.
When tweaking the class a little and running the tests::
Since the Undefined class overloads sets __getattr__ = _die, this causes some unexpected behavior on Python 2.6.2
I'm thinking that this behavior was introduced in: http://bugs.python.org/issue1242657 Another example of this behavior can be found in the test case that came along with it: http://svn.python.org/view/python/trunk/Lib/test/test_iterlen.py?r1=69227&r2=69226&pathrev=69227
I threw together the following patch for Fedora that gets the test suite running again: