[Zodb-checkins] SVN: ZODB/branches/jim-zeo-blob/src/ZODB/Blobs/tests/transaction.txt 'rb' is not a valid mode. Binary mode is implicit.

Jim Fulton jim at zope.com
Fri May 18 11:43:25 EDT 2007


Log message for revision 75833:
  'rb' is not a valid mode.  Binary mode is implicit.
  

Changed:
  U   ZODB/branches/jim-zeo-blob/src/ZODB/Blobs/tests/transaction.txt

-=-
Modified: ZODB/branches/jim-zeo-blob/src/ZODB/Blobs/tests/transaction.txt
===================================================================
--- ZODB/branches/jim-zeo-blob/src/ZODB/Blobs/tests/transaction.txt	2007-05-18 15:42:57 UTC (rev 75832)
+++ ZODB/branches/jim-zeo-blob/src/ZODB/Blobs/tests/transaction.txt	2007-05-18 15:43:24 UTC (rev 75833)
@@ -206,20 +206,20 @@
     >>> connection5 = database.open()
     >>> root5 = connection5.root()
     >>> blob = Blob()
-    >>> blob_fh = blob.open("wb")
+    >>> blob_fh = blob.open("w")
     >>> blob_fh.write("I'm a happy blob.")
     >>> blob_fh.close()
     >>> root5['blob'] = blob
     >>> transaction.commit()
-    >>> root5['blob'].open("rb").read()
+    >>> root5['blob'].open("r").read()
     "I'm a happy blob."
     >>> blob_fh = root5['blob'].open("a")
     >>> blob_fh.write(" And I'm singing.")
     >>> blob_fh.close()
-    >>> root5['blob'].open("rb").read()
+    >>> root5['blob'].open("r").read()
     "I'm a happy blob. And I'm singing."
     >>> savepoint = transaction.savepoint(optimistic=True)
-    >>> root5['blob'].open("rb").read()
+    >>> root5['blob'].open("r").read()
     "I'm a happy blob. And I'm singing."
     >>> transaction.get().commit()
 
@@ -228,7 +228,7 @@
     >>> blob_fh = root5['blob'].open("a")
     >>> blob_fh.write(" And the weather is beautiful.")
     >>> blob_fh.close()
-    >>> root5['blob'].open("rb").read()
+    >>> root5['blob'].open("r").read()
     "I'm a happy blob. And I'm singing. And the weather is beautiful."
     >>> savepoint = transaction.savepoint()             # doctest: +ELLIPSIS
     Traceback (most recent call last):
@@ -245,7 +245,7 @@
     >>> connection6 = database.open()
     >>> root6 = connection6.root()
     >>> blob = Blob()
-    >>> blob_fh = blob.open("wb")
+    >>> blob_fh = blob.open("w")
     >>> blob_fh.write("I'm a happy blob.")
     >>> blob_fh.close()
     >>> root6['blob'] = blob
@@ -264,7 +264,7 @@
 nor when the Blob is already opened for writing::
 
     >>> blob = Blob()
-    >>> blob_fh = blob.open("wb")
+    >>> blob_fh = blob.open("w")
     >>> blob.openDetached()
     Traceback (most recent call last):
         ...
@@ -290,13 +290,13 @@
 It does work when the transaction was aborted, though::
 
     >>> blob = Blob()
-    >>> blob_fh = blob.open("wb")
+    >>> blob_fh = blob.open("w")
     >>> blob_fh.write("I'm a happy blob.")
     >>> blob_fh.close()
     >>> root6['blob'] = blob
     >>> transaction.commit()
 
-    >>> blob_fh = blob.open("wb")
+    >>> blob_fh = blob.open("w")
     >>> blob_fh.write("And I'm singing.")
     >>> blob_fh.close()
     >>> transaction.abort()



More information about the Zodb-checkins mailing list