Changeset 128

Show
Ignore:
Timestamp:
2002-03-30 18:38:23 (7 years ago)
Author:
schwa
Message:
TestFileOperations: converted ascii_readlines to test_ascii_readlines.
Files:

Legend:

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

    r127 r128  
    3030# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    3131 
    32 # $Id: _test_ftputil.py,v 1.40 2002/03/30 18:36:39 schwa Exp $ 
     32# $Id: _test_ftputil.py,v 1.41 2002/03/30 18:38:23 schwa Exp $ 
    3333 
    3434import unittest 
     
    328328        self.assertEqual(data, '') 
    329329        input_.close() 
    330 
    331 #     def ascii_readlines(self): 
    332 #         """Use readline operations to get data.""" 
    333 #         host = self.host 
    334 #         # write some data 
    335 #         local_data = 'line 1\nanother line\nyet another line' 
    336 #         self.write_test_data(local_data, 'w') 
    337 #         input_ = host.file(self.remote_name, 'r') 
    338 #         data = input_.read(3) 
    339 #         self.assertEqual(data, 'lin') 
    340 #         data = input_.readlines() 
    341 #         self.assertEqual(data, ['e 1\n', 'another line\n', 
    342 #                                 'yet another line']) 
    343 #         input_.close() 
     330 
     331    def test_ascii_readlines(self): 
     332        """Use ASCII readline operations to get data.""" 
     333        host = ftp_host_factory(session_factory=ReadMockSession) 
     334        input_ = host.file('dummy', 'r') 
     335        data = input_.read(3) 
     336        self.assertEqual(data, 'lin') 
     337        data = input_.readlines() 
     338        self.assertEqual(data, ['e 1\n', 'another line\n', 
     339                                'yet another line']) 
     340        input_.close() 
    344341# 
    345342#     def ascii_xreadlines(self):