Changeset 117

Show
Ignore:
Timestamp:
2002-03-30 15:31:30 (7 years ago)
Author:
schwa
Message:
TestStat: added test_failing_lstat to test for exception.
Files:

Legend:

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

    r116 r117  
    3030# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    3131 
    32 # $Id: _test_ftputil.py,v 1.31 2002/03/30 15:28:35 schwa Exp $ 
     32# $Id: _test_ftputil.py,v 1.32 2002/03/30 15:31:30 schwa Exp $ 
    3333 
    3434import unittest 
     
    6161    (test currently only implemented for Unix server format. 
    6262    """ 
     63 
     64    def test_failing_lstat(self): 
     65        """Test whether lstat fails for a nonexistent path.""" 
     66        host = FTPHostWrapper(_mock_ftplib.MockSession) 
     67        self.assertRaises(ftputil.PermanentError, host.lstat, 
     68                          '/home/sschwarzer/notthere') 
    6369 
    6470    def test_lstat_one_file(self):