[Zope3-checkins] SVN: Zope3/branches/ZopeX3-3.0/src/zope/tales/tests/test_tales.py Merged from trunk:

Jim Fulton jim at zope.com
Tue Aug 3 11:05:20 EDT 2004


Log message for revision 26876:
  Merged from trunk:
  
    r26875 | jim | 2004-08-03 10:23:28 -0400 (Tue, 03 Aug 2004) | 2 lines
  
  *Never* use the assert statement in a test case.
  


Changed:
  U   Zope3/branches/ZopeX3-3.0/src/zope/tales/tests/test_tales.py


-=-
Modified: Zope3/branches/ZopeX3-3.0/src/zope/tales/tests/test_tales.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/tales/tests/test_tales.py	2004-08-03 14:23:28 UTC (rev 26875)
+++ Zope3/branches/ZopeX3-3.0/src/zope/tales/tests/test_tales.py	2004-08-03 15:05:19 UTC (rev 26876)
@@ -42,7 +42,7 @@
         for c in 'text':
             context._assert_('setLocal', 'text', c)
         for c in 'text':
-            assert it.next(), "Multi-element iterator"
+            self.assert_(it.next(), "Multi-element iterator")
         self.assert_( not it.next(), "Multi-element iterator")
         context._complete_()
 
@@ -136,7 +136,8 @@
         self._callstack.append((name, args, kwargs))
 
     def _complete_(self):
-        assert len(self._callstack) == 0, "Harness methods called"
+        self._testcase.assert_(len(self._callstack) == 0,
+                               "Harness methods called")
 
     def __getattr__(self, name):
         return HarnessMethod(self, name)



More information about the Zope3-Checkins mailing list