[Zope-Checkins] SVN: Zope/trunk/lib/python/reStructuredText/tests/testReST.py dedicated tests for 'file' and 'url options

Andreas Jung andreas at andreas-jung.com
Sun Jul 9 05:37:28 EDT 2006


Log message for revision 69056:
  dedicated tests for 'file' and 'url options
  

Changed:
  U   Zope/trunk/lib/python/reStructuredText/tests/testReST.py

-=-
Modified: Zope/trunk/lib/python/reStructuredText/tests/testReST.py
===================================================================
--- Zope/trunk/lib/python/reStructuredText/tests/testReST.py	2006-07-09 09:35:23 UTC (rev 69055)
+++ Zope/trunk/lib/python/reStructuredText/tests/testReST.py	2006-07-09 09:37:27 UTC (rev 69056)
@@ -86,13 +86,18 @@
         source = 'hello world\n .. include:: /etc/passwd'
         self.assertRaises(NotImplementedError, HTML, source)
 
-# disabled test so far until we have a consensus how to deal with 'raw'
-#    def testRawPassthrough(self):
-#
-#        source = '.. raw:: html\n\n  <h1>HELLO WORLD</h1>'
-#        self.assertRaises(NotImplementedError, HTML, source)
 
+    def testRawPassthrough(self):
 
+        source = '.. raw:: html\n  <h1>HELLO WORLD</h1>'
+        result = HTML(source)       # don't raise
+
+        source = '.. raw:: html\n  :file: inclusion.txt'
+        self.assertRaises(NotImplementedError, HTML, source)
+
+        source = '.. raw:: html\n  :url: http://www.zope.org'
+        self.assertRaises(NotImplementedError, HTML, source)
+
 def test_suite():
     from unittest import TestSuite, makeSuite
     return TestSuite((makeSuite(TestReST),))



More information about the Zope-Checkins mailing list