[Checkins] SVN: zope.file/trunk/ Increase test coverage.

Ulrich Fouquet cvs-admin at zope.org
Mon Jun 4 15:32:49 UTC 2012


Log message for revision 126565:
  Increase test coverage.

Changed:
  U   zope.file/trunk/CHANGES.txt
  U   zope.file/trunk/src/zope/file/README.txt
  U   zope.file/trunk/src/zope/file/tests.py

-=-
Modified: zope.file/trunk/CHANGES.txt
===================================================================
--- zope.file/trunk/CHANGES.txt	2012-06-04 15:30:29 UTC (rev 126564)
+++ zope.file/trunk/CHANGES.txt	2012-06-04 15:32:45 UTC (rev 126565)
@@ -8,6 +8,8 @@
 - Moved menu-oriented registrations into new menus.zcml. This is now
   loaded if zope.app.zcmlfiles is available only.
 
+- Increase test coverage.
+
 0.6.1 (2012-01-26)
 ------------------
 

Modified: zope.file/trunk/src/zope/file/README.txt
===================================================================
--- zope.file/trunk/src/zope/file/README.txt	2012-06-04 15:30:29 UTC (rev 126564)
+++ zope.file/trunk/src/zope/file/README.txt	2012-06-04 15:32:45 UTC (rev 126565)
@@ -33,6 +33,17 @@
   >>> f.parameters["charset"]
   'us-ascii'
 
+Both, `parameters` and `mimeType` can optionally also be set when
+creating a `File` object:
+
+  >>> f2 = File(mimeType = "application/octet-stream",
+  ...           parameters = dict(charset = "utf-8"))
+  >>> f2.mimeType
+  'application/octet-stream'
+
+  >>> f2.parameters["charset"]
+  'utf-8'
+
 File objects also sport a `size` attribute that provides the number of
 bytes in the file:
 

Modified: zope.file/trunk/src/zope/file/tests.py
===================================================================
--- zope.file/trunk/src/zope/file/tests.py	2012-06-04 15:30:29 UTC (rev 126564)
+++ zope.file/trunk/src/zope/file/tests.py	2012-06-04 15:32:45 UTC (rev 126565)
@@ -28,6 +28,7 @@
     return unittest.TestSuite((
         doctest.DocFileSuite("README.txt"),
         doctest.DocFileSuite("browser.txt"),
+        fromDocFile("adapters.txt"),
         fromDocFile("contenttype.txt"),
         fromDocFile("download.txt"),
         fromDocFile("upload.txt"),



More information about the checkins mailing list