You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by aj...@apache.org on 2004/01/10 00:18:03 UTC
cvs commit: jakarta-gump/python/gump/test pyunit.py stats.py
ajack 2004/01/09 15:18:03
Modified: python/gump/test pyunit.py stats.py
Log:
Oddly in only accepts char on Linux, not string (as seems to work on PC).
Revision Changes Path
1.15 +12 -3 jakarta-gump/python/gump/test/pyunit.py
Index: pyunit.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/test/pyunit.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- pyunit.py 9 Jan 2004 23:02:32 -0000 1.14
+++ pyunit.py 9 Jan 2004 23:18:02 -0000 1.15
@@ -117,10 +117,19 @@
if not object in sequence:
self.raiseIssue(['Ought evaluate as in', message, object, sequence])
+ def assertSubstring(self,message,subString,mainString):
+ if not -1 == mainSequence.find(subString):
+ self.raiseIssue(['Ought evaluate as in', message, object, sequence])
+
def assertNotIn(self,message,object,sequence):
if object in sequence:
self.raiseIssue(['Ought NOT evaluate as in', message, object, sequence])
+ def assertNotSubstring(self,message,subString,mainString):
+ if -1 == mainSequence.find(subString):
+ self.raiseIssue(['Ought evaluate as in', message, object, sequence])
+
+
def assertLengthAbove(self,message,object,length):
if not len(object) >= length:
self.raiseIssue(['Ought be longer than', message, object, length])
1.6 +4 -4 jakarta-gump/python/gump/test/stats.py
Index: stats.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/test/stats.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- stats.py 9 Jan 2004 23:02:32 -0000 1.5
+++ stats.py 9 Jan 2004 23:18:02 -0000 1.6
@@ -152,6 +152,6 @@
rough=getGeneralDifferenceDescription(default.time, lastUpdated)
self.assertNonZeroString('Date Diff String', rough)
- self.assertNotIn('Date Diff String', 'year', rough)
+ self.assertNotSubstring('Date Diff String', 'year', rough)