[Zope3-checkins] CVS: Zope3/src/zope/security/tests - test_standard_checkers.py:1.2

Jim Fulton jim@zope.com
Tue, 27 May 2003 17:14:12 -0400


Update of /cvs-repository/Zope3/src/zope/security/tests
In directory cvs.zope.org:/tmp/cvs-serv14263/src/zope/security/tests

Modified Files:
	test_standard_checkers.py 
Log Message:
Fixed some tests to account for the fact that booleans print
differently in Python 2.2 and 2.3.


=== Zope3/src/zope/security/tests/test_standard_checkers.py 1.1 => 1.2 ===
--- Zope3/src/zope/security/tests/test_standard_checkers.py:1.1	Thu May 22 15:40:32 2003
+++ Zope3/src/zope/security/tests/test_standard_checkers.py	Tue May 27 17:14:11 2003
@@ -45,7 +45,7 @@
     ['a', 'b']
     >>> d.get('a')
     1
-    >>> d.has_key('a')
+    >>> int(d.has_key('a'))
     1
     
     >>> c = d.copy()
@@ -81,21 +81,21 @@
 
     Always available:
     
-    >>> d < d
+    >>> int(d < d)
     0
-    >>> d > d
+    >>> int(d > d)
     0
-    >>> d <= d
+    >>> int(d <= d)
     1
-    >>> d >= d
+    >>> int(d >= d)
     1
-    >>> d == d
+    >>> int(d == d)
     1
-    >>> d != d
+    >>> int(d != d)
     0
     >>> int(bool(d))
     1
-    >>> d.__class__ == dict
+    >>> int(d.__class__ == dict)
     1
 
     """
@@ -126,7 +126,7 @@
     2
     >>> tuple(l)
     (1, 2)
-    >>> 1 in l
+    >>> int(1 in l)
     1
     >>> l.index(2)
     1
@@ -141,21 +141,21 @@
 
     Always available:
     
-    >>> l < l
+    >>> int(l < l)
     0
-    >>> l > l
+    >>> int(l > l)
     0
-    >>> l <= l
+    >>> int(l <= l)
     1
-    >>> l >= l
+    >>> int(l >= l)
     1
-    >>> l == l
+    >>> int(l == l)
     1
-    >>> l != l
+    >>> int(l != l)
     0
     >>> int(bool(l))
     1
-    >>> l.__class__ == list
+    >>> int(l.__class__ == list)
     1
 
         
@@ -175,7 +175,7 @@
     2
     >>> list(l)
     [1, 2]
-    >>> 1 in l
+    >>> int(1 in l)
     1
     >>> str(l)
     '(1, 2)'
@@ -186,21 +186,21 @@
 
     Always available:
     
-    >>> l < l
+    >>> int(l < l)
     0
-    >>> l > l
+    >>> int(l > l)
     0
-    >>> l <= l
+    >>> int(l <= l)
     1
-    >>> l >= l
+    >>> int(l >= l)
     1
-    >>> l == l
+    >>> int(l == l)
     1
-    >>> l != l
+    >>> int(l != l)
     0
     >>> int(bool(l))
     1
-    >>> l.__class__ == tuple
+    >>> int(l.__class__ == tuple)
     1
         
     """
@@ -230,21 +230,21 @@
     
     Always available:
     
-    >>> C < C
+    >>> int(C < C)
     0
-    >>> C > C
+    >>> int(C > C)
     0
-    >>> C <= C
+    >>> int(C <= C)
     1
-    >>> C >= C
+    >>> int(C >= C)
     1
-    >>> C == C
+    >>> int(C == C)
     1
-    >>> C != C
+    >>> int(C != C)
     0
     >>> int(bool(C))
     1
-    >>> C.__class__ == type
+    >>> int(C.__class__ == type)
     1
     
     """
@@ -270,21 +270,21 @@
     
     Always available:
     
-    >>> c < c
+    >>> int(c < c)
     0
-    >>> c > c
+    >>> int(c > c)
     0
-    >>> c <= c
+    >>> int(c <= c)
     1
-    >>> c >= c
+    >>> int(c >= c)
     1
-    >>> c == c
+    >>> int(c == c)
     1
-    >>> c != c
+    >>> int(c != c)
     0
     >>> int(bool(c))
     1
-    >>> c.__class__ == C
+    >>> int(c.__class__ == C)
     1
     
     """
@@ -312,17 +312,17 @@
     
     Always available:
     
-    >>> C < C
+    >>> int(C < C)
     0
-    >>> C > C
+    >>> int(C > C)
     0
-    >>> C <= C
+    >>> int(C <= C)
     1
-    >>> C >= C
+    >>> int(C >= C)
     1
-    >>> C == C
+    >>> int(C == C)
     1
-    >>> C != C
+    >>> int(C != C)
     0
     >>> int(bool(C))
     1
@@ -350,21 +350,21 @@
     
     Always available:
     
-    >>> c < c
+    >>> int(c < c)
     0
-    >>> c > c
+    >>> int(c > c)
     0
-    >>> c <= c
+    >>> int(c <= c)
     1
-    >>> c >= c
+    >>> int(c >= c)
     1
-    >>> c == c
+    >>> int(c == c)
     1
-    >>> c != c
+    >>> int(c != c)
     0
     >>> int(bool(c))
     1
-    >>> c.__class__ == C
+    >>> int(c.__class__ == C)
     1
     
     """