Changeset 130

Show
Ignore:
Timestamp:
2002-03-30 18:45:55 (7 years ago)
Author:
schwa
Message:
TestFileOperations: added test test_read_unknown_file.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/_test_ftputil.py

    r129 r130  
    3030# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    3131 
    32 # $Id: _test_ftputil.py,v 1.42 2002/03/30 18:40:23 schwa Exp $ 
     32# $Id: _test_ftputil.py,v 1.43 2002/03/30 18:45:55 schwa Exp $ 
    3333 
    3434import unittest 
     
    364364        self.assertRaises(IndexError, operator.__getitem__, 
    365365                          xrl_obj, 3) 
     366     
     367    def test_read_unknown_file(self): 
     368        """Test whether reading a file which isn't there fails.""" 
     369        host = ftp_host_factory() 
     370        self.assertRaises(ftputil.FTPIOError, host.file, 
     371                          'notthere', 'r') 
    366372# 
    367373#     def test_read_from_host(self): 
     
    370376#         host.chdir(self.testdir) 
    371377#         self.remote_name = '__test.dat' 
    372 #         # try to read a file which isn't there 
    373 #         self.assertRaises(ftputil.FTPIOError, host.file, 
    374 #                           'notthere', 'r') 
    375378#         self.ascii_read() 
    376379#         self.ascii_readline()