Mercurial > genshi > mirror
diff genshi/filters/tests/transform.py @ 800:73429f585213 trunk
Fix for filter transformation, closing #290. Thanks to Stephen Compall for reporting the problem and providing a patch.
author | cmlenz |
---|---|
date | Tue, 03 Mar 2009 20:17:46 +0000 |
parents | cd6624cf2f7c |
children | 129e54866a98 |
line wrap: on
line diff
--- a/genshi/filters/tests/transform.py +++ b/genshi/filters/tests/transform.py @@ -522,6 +522,15 @@ self._filter('.', 'foo'), [[(None, TEXT, u'foo')]]) + def test_filter_after_outside(self): + stream = _transform( + '<root>x</root>', Transformer('//root/text()').filter(lambda x: x)) + self.assertEqual( + list(stream), + [(None, START, u'root'), + (OUTSIDE, TEXT, u'x'), + (None, END, u'root')]) + class MapTest(unittest.TestCase): def _map(self, select, kind=None):