Changeset 8715


Ignore:
Timestamp:
Feb 22, 2013, 5:28:56 PM (12 years ago)
Author:
steve
Message:

Getting rid of a unit test error on test_gauge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test_gauge.py

    r8615 r8715  
    384384        point1_answers_array = [[0.0,0.0,1.0,3.0,-2.0,3.0,4.0], [2.0,2.0/3600.,10.0,12.0,-2.0,3.0,4.0]]
    385385        point1_filename = 'gauge_point1.csv'
    386         point1_handle = file(point1_filename)
     386        point1_handle = open(point1_filename)
    387387        point1_reader = reader(point1_handle)
    388388        point1_reader.next()
     
    397397        point2_answers_array = [[0.0,0.0,1.0,5.0,-4.0,3.0,4.0], [2.0,2.0/3600.,10.0,14.0,-4.0,3.0,4.0]]
    398398        point2_filename = 'gauge_point2.csv'
    399         point2_handle = file(point2_filename)
     399        point2_handle = open(point2_filename)
    400400        point2_reader = reader(point2_handle)
    401401        point2_reader.next()
     
    471471        # Create two sww files with timestep at end. These are to be
    472472        # stored consecutively in the gauge csv files
    473         basename='datatest'
     473        basename='datatest1'
    474474        domain.set_name(basename)
    475475        self._create_sww(stage=10.,timestep=timestep)
     
    501501
    502502        point1_answers_array = [[0.0,1.0,-5.0], [2.0,10.0,-5.0],[4.0,10.0,-5.0],
    503                                 [6.0,20.0,-5.0]]
     503                                [6.0,20.0,-5.0], [0.0,1.0,-5.0]]
    504504        point1_filename = 'gauge_point1.csv'
    505505        point1_handle = file(point1_filename)
     
    511511            # note the 'hole' (element 1) below - skip the new 'hours' field
    512512            line.append([float(row[0]),float(row[2]),float(row[3])])
     513            #print 'i', i
     514            #print 'row',row
    513515            #print 'line',line[i],'point1',point1_answers_array[i]
    514516            assert num.allclose(line[i], point1_answers_array[i])
    515517
    516518        point2_answers_array = [[0.0,1.0,-0.5], [2.0,10.0,-0.5],[4.0,10.0,-0.5],
    517                                 [6.0,20.0,-0.5]]
     519                                [6.0,20.0,-0.5], [0.0,1.0,-0.5]]
    518520        point2_filename = 'gauge_point2.csv'
    519521        point2_handle = file(point2_filename)
Note: See TracChangeset for help on using the changeset viewer.