CVS: Products/ParsedXML/NodePath/tests - test_nodepath.py:1.4

Martijn Faassen <[email protected]> Wed, 24 Apr 2002 09:43:53 -0400
Newsgroups gmane.comp.web.zope.parsed-xml
Message-ID <[email protected]>
Update of /cvs-repository/Products/ParsedXML/NodePath/tests
In directory cvs.zope.org:/tmp/cvs-serv9037/tests

Modified Files:
	test_nodepath.py 
Log Message:
Allow empty nodepaths.


=== Products/ParsedXML/NodePath/tests/test_nodepath.py 1.3 => 1.4 ===
     def checkChildPath(self):
         self._shotgun_check(self._doc, self._doc.documentElement, 'child')
-
+        
     def checkElementIdPath(self):
         self._shotgun_check(self._doc, self._doc.documentElement, 'element_id')
         
     def checkRobustPath(self):
         self._shotgun_check_robust(self._doc, self._doc.documentElement)
-    
+
+    def checkEmptyPath(self):
+        self.assertEquals('',
+                          registry.create_path(self._doc, self._doc, 'child'))
+        self.assertEquals('',
+                          registry.create_path(self._doc, self._doc, 'element_id'))     
+        #self.assertEquals('',
+        #                  registry.create_path(self._doc, self._doc, 'robust'))
+        found = registry.resolve_path(self._doc, '')
+        self.assertEquals(self._doc, found)
+        
 def test_suite():
     suite = unittest.TestSuite()
     suite.addTest(unittest.makeSuite(NodePathTestCase, "check"))