tests/test_lib_utils.py
branchpy33
changeset 3723 99aa837b6703
parent 3668 d8a42e00c079
child 3823 c8133d91487a
equal deleted inserted replaced
3722:29c11b905751 3723:99aa837b6703
   113         from reportlab.lib.utils import open_and_read
   113         from reportlab.lib.utils import open_and_read
   114         b = open_and_read('http://www.reportlab.com/rsrc/encryption.gif')
   114         b = open_and_read('http://www.reportlab.com/rsrc/encryption.gif')
   115 
   115 
   116     def test10(self):
   116     def test10(self):
   117         "test open and read of a simple relative file"
   117         "test open and read of a simple relative file"
   118         from reportlab.lib.utils import open_and_read, getStringIO
   118         from reportlab.lib.utils import open_and_read, getBytesIO
   119         b = getStringIO(_rel_open_and_read('../docs/images/Edit_Prefs.gif'))
   119         b = getBytesIO(_rel_open_and_read('../docs/images/Edit_Prefs.gif'))
   120         b = open_and_read(b)
   120         b = open_and_read(b)
   121 
   121 
   122 
   122 
   123     def testRecursiveImportErrors(self):
   123     def testRecursiveImportErrors(self):
   124         "check we get useful error messages"
   124         "check we get useful error messages"