Changeset 5044


Ignore:
Timestamp:
Feb 18, 2008, 6:20:11 PM (17 years ago)
Author:
ole
Message:

Dealt with path of external file for use with unit test.

File:
1 edited

Legend:

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

    r5042 r5044  
    66from Scientific.IO.NetCDF import NetCDFFile
    77import zlib
     8from os.path import join, split, sep
    89
    9 from system_tools import *
     10from anuga.utilities.system_tools import *
    1011
    1112class Test_system_tools(unittest.TestCase):
     
    105106        """
    106107
    107         filename = 'crc_test_file.png'
     108        # Get path where this test is run
     109        import anuga.utilities as u
     110        path = u.__path__[0]
     111        filename = path + sep +  'crc_test_file.png'
    108112
    109113        ref_crc = 1203293305 # Computed on Windows box
    110114        checksum = compute_checksum(filename)
    111115
    112         msg = 'Computed checksum = %s, should have been %s' %(checksum, ref_crc)
     116        msg = 'Computed checksum = %s, should have been %s'\
     117              %(checksum, ref_crc)
    113118        assert checksum == ref_crc, msg
    114119        #print checksum
Note: See TracChangeset for help on using the changeset viewer.