[Zope-Checkins] CVS: Zope/lib/python/StructuredText/tests - testStructuredText.py:1.10 framework.py:NONE

Tres Seaver tseaver@zope.com
Wed, 17 Oct 2001 16:01:06 -0400


Update of /cvs-repository/Zope/lib/python/StructuredText/tests
In directory cvs.zope.org:/tmp/cvs-serv30119/lib/python/StructuredText/tests

Modified Files:
	testStructuredText.py 
Removed Files:
	framework.py 
Log Message:


  o Land unit test cleanup from branch.

  o Known breakage as of 2001/10/17:

    - TAL test suite is very broken (TAL is currently suppressed in
      lib/python/.testinfo).

    - AccessControl tests don't run if run first;  lib/python/.testinfo
      pushes them to the end of the queue, at which point they *do* run.
      Global side effects suck!

    - lib/python/BTrees/testBTreesUnicode.py:  weird flakiness around
      comparison of ASCII and Unicode strings;  breaks in different
      ways under Python 2.1 and 2.2.

    - lib/python/Products/PageTemplates/tests:  three tests break due
      to security asserctions.


=== Zope/lib/python/StructuredText/tests/testStructuredText.py 1.9 => 1.10 ===
                 try:
                     open('_tmpout','w').write(html)
-                    ndiff.fcompare(os.path.join(regressions,reg_fname),'_tmpout')
+                    ndiff.fcompare(os.path.join(regressions,reg_fname),
+                                   '_tmpout')
                     os.unlink('_tmpout')
                 finally:
                     sys.stdout = oldStdout 
 
                 raise AssertionError, \
-                    'HTML regression test failed on %s\nDiff:\n%s\n' % (f,IO.getvalue())
+                    'HTML regression test failed on %s\nDiff:\n%s\n' % (f,
+                     IO.getvalue())
 
 
 class BasicTests(unittest.TestCase):
@@ -216,11 +218,12 @@
 
     def testStrong(self):
         """ strong """
-        self._test("xx **this is html** xx","xx <strong>this is html</strong> xx")
+        self._test("xx **this is html** xx",
+                   "xx <strong>this is html</strong> xx")
         
     def testUnderlineThroughoutTags(self):
         """Underlined text containing tags should not be transformed"""
-        self._test('<a href="index_html">index_html</a>', \
+        self._test('<a href="index_html">index_html</a>', 
                    '<a href="index_html">index_html</a>')
 
     
@@ -230,8 +233,14 @@
         self._test("this is '__a_literal__' eh",
                    "<code>__a_literal__</code>")
 
-
 def test_suite():
-    return unittest.TestSuite((unittest.makeSuite(StructuredTextTests),
-                    unittest.makeSuite(BasicTests)))
+    suite = unittest.TestSuite()
+    suite.addTest( unittest.makeSuite( StructuredTextTests ) )
+    suite.addTest( unittest.makeSuite( BasicTests ) )
+    return suite
+
+def main():
+    unittest.TextTestRunner().run(test_suite())
 
+if __name__ == '__main__':
+    main()

=== Removed File Zope/lib/python/StructuredText/tests/framework.py ===