#!/usr/bin/env python

import unittest
import re

from genshi.template import MarkupTemplate

tmpl_data="""<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://genshi.edgewall.org/">
    
  <py:match path="body[@id='content']/h2" />
  <head py:match="head" />
  <head py:match="head" />
  
  <head />
  <body />
</html>
"""

class TestExceptionWithMultipleMatches(unittest.TestCase):
    def test_no_match(self):
        tmpl = MarkupTemplate(tmpl_data)
        tmpl.generate().render('xhtml', doctype='xhtml')



