Mercurial > genshi > mirror
comparison genshi/tests/builder.py @ 967:19ac5d8fd96c trunk
Fix a number of tests which Python's new hash randomization is causing to fail randomly.
author | hodgestar |
---|---|
date | Sat, 29 Dec 2012 19:14:10 +0000 |
parents | 7811327c536a |
children | 2d1dede6bf45 |
comparison
equal
deleted
inserted
replaced
966:570226c48119 | 967:19ac5d8fd96c |
---|---|
20 | 20 |
21 | 21 |
22 class ElementFactoryTestCase(unittest.TestCase): | 22 class ElementFactoryTestCase(unittest.TestCase): |
23 | 23 |
24 def test_link(self): | 24 def test_link(self): |
25 link = tag.a(href='#', title='Foo', accesskey=None)('Bar') | 25 link = tag.a(href='#', accesskey=None)('Bar') |
26 events = list(link.generate()) | 26 events = list(link.generate()) |
27 self.assertEqual((Stream.START, | 27 self.assertEqual((Stream.START, |
28 ('a', Attrs([('href', "#"), ('title', "Foo")])), | 28 ('a', Attrs([('href', "#")])), |
29 (None, -1, -1)), events[0]) | 29 (None, -1, -1)), events[0]) |
30 self.assertEqual((Stream.TEXT, 'Bar', (None, -1, -1)), events[1]) | 30 self.assertEqual((Stream.TEXT, 'Bar', (None, -1, -1)), events[1]) |
31 self.assertEqual((Stream.END, 'a', (None, -1, -1)), events[2]) | 31 self.assertEqual((Stream.END, 'a', (None, -1, -1)), events[2]) |
32 | 32 |
33 def test_nonstring_attributes(self): | 33 def test_nonstring_attributes(self): |