Edgewall Software

Ticket #370: simple_fix_bad_test.py

File simple_fix_bad_test.py, 615 bytes (added by Felix Schwarz <felix.schwarz@…>, 14 years ago)

Actually my 'fix' is faulty, as this test case fails after my proposed modification

Line 
1#!/usr/bin/env python
2
3import unittest
4import re
5
6from genshi.template import MarkupTemplate
7
8tmpl_data="""<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://genshi.edgewall.org/">
9  <py:match path="body/div[@id='properties']" />
10 
11  <head py:match="head" />
12  <head py:match="head" />
13  <head/>
14 
15  <body>
16    <div id="properties">Foo</div>
17  </body>
18</html>
19"""
20
21class TestNoMatchWithMultipleMatchTemplates(unittest.TestCase):
22    def test_no_match(self):
23        tmpl = MarkupTemplate(tmpl_data)
24        html = tmpl.generate().render('xhtml', doctype='xhtml')
25        assert 'Foo' not in html, html
26
27