Mercurial > genshi > mirror
comparison genshi/template/tests/eval.py @ 731:01bdf155db95 trunk
Workaround for a Python 2.4 bug that broke star imports in template code blocks. Closes #221. Many thanks to Armin Ronacher for the patch.
author | cmlenz |
---|---|
date | Sun, 01 Jun 2008 20:09:28 +0000 |
parents | 4bc6741b2811 |
children | a1e8b24bc1bb |
comparison
equal
deleted
inserted
replaced
730:5e9d250ad3ad | 731:01bdf155db95 |
---|---|
569 suite = Suite("from itertools import ifilter") | 569 suite = Suite("from itertools import ifilter") |
570 data = {} | 570 data = {} |
571 suite.execute(data) | 571 suite.execute(data) |
572 assert 'ifilter' in data | 572 assert 'ifilter' in data |
573 | 573 |
574 def test_import_star(self): | |
575 suite = Suite("from itertools import *") | |
576 data = {} | |
577 suite.execute(data) | |
578 assert 'ifilter' in data | |
579 | |
574 def test_for(self): | 580 def test_for(self): |
575 suite = Suite("""x = [] | 581 suite = Suite("""x = [] |
576 for i in range(3): | 582 for i in range(3): |
577 x.append(i**2) | 583 x.append(i**2) |
578 """) | 584 """) |