Changeset 1872


Ignore:
Timestamp:
Oct 6, 2005, 10:39:24 AM (18 years ago)
Author:
ole
Message:

Worked on exception catching. A test still fails on cyclone

Location:
inundation/pyvolution
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • inundation/pyvolution/least_squares.py

    r1871 r1872  
    109109        if display_errors:
    110110            print "Could not load bad file. ", e
    111         import sys; sys.exit()
     111        raise IOError  #Re-raise exception       
    112112
    113113    point_coordinates = point_dict['pointlist']
  • inundation/pyvolution/test_least_squares.py

    r1869 r1872  
    14631463            fit_to_mesh_file(mesh_file, point_file,
    14641464                             mesh_output_file, display_errors = False)
    1465         except SystemExit:  pass
     1465        except IOError:
     1466            pass
    14661467        else:
    1467             self.failUnless(0 ==1,  'Bad file did not raise error!')       
     1468            #self.failUnless(0 ==1,  'Bad file did not raise error!')
     1469            raise 'Bad file did not raise error!'
     1470           
    14681471        #clean up
    14691472        os.remove(mesh_file)
     
    15271530        #There might be platform issus (Unix/Windows)
    15281531        #In any case, the call itself does not raise an exception on cyclone - why?
    1529         mesh_output_file = "e:\new_triangle.tsh"
     1532        mesh_output_file = "e:\new_triangle.tsh"
     1533        fit_to_mesh_file(mesh_file, point_file,
     1534                         mesh_output_file, display_errors = False)       
    15301535        try:
    15311536            fit_to_mesh_file(mesh_file, point_file,
Note: See TracChangeset for help on using the changeset viewer.