Ignore:
Timestamp:
Feb 7, 2008, 6:28:04 PM (17 years ago)
Author:
ole
Message:

Progress on XML object model

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/utilities/test_system_tools.py

    r4986 r5008  
    3737
    3838        # Generate a text file
    39         tmp_fd , tmp_name = mkstemp(suffix='.tmp',dir='.')
    40         fid = os.fdopen(tmp_fd,'w')
     39        tmp_fd , tmp_name = mkstemp(suffix='.tmp', dir='.')
     40        fid = os.fdopen(tmp_fd, 'w')
    4141        string = 'My temp file with textual content. AAAABBBBCCCC1234'
    4242        fid.write(string)
    43         fid.flush()
    4443        fid.close()
    4544
    4645        ref_crc = zlib.crc32(string)
    47 
    4846        checksum = compute_checksum(tmp_name)
    49 
    50 
    5147        assert checksum == ref_crc
    5248
     
    5652
    5753        # Binary file
    58         tmp_fd , tmp_name = mkstemp(suffix='.tmp',dir='.')
    59         fid = os.fdopen(tmp_fd,'w+b')
    60        
     54        tmp_fd , tmp_name = mkstemp(suffix='.tmp', dir='.')
     55        fid = os.fdopen(tmp_fd, 'w+b')
    6156
    6257        string = 'My temp file with binary content. AAAABBBBCCCC1234'
    6358        fid.write(string)
    64         fid.flush()
     59        fid.close()
    6560
    6661
     
    7065        assert checksum == ref_crc
    7166
    72         # Close and remove temporary file
    73         fid.close()
    7467        os.remove(tmp_name)       
    7568       
Note: See TracChangeset for help on using the changeset viewer.