Ignore:
Timestamp:
Oct 10, 2005, 4:32:26 PM (20 years ago)
Author:
duncan
Message:

added test for checking exit status when using least_squares.py in the command line.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/pyvolution/least_squares.py

    r1887 r1888  
    12651265    """
    12661266    import os, sys
    1267     usage = "usage: %s mesh_input.tsh point.xya mesh_output.tsh [expand|no_expand][vervose|non_verbose] [alpha]"\
     1267    usage = "usage: %s mesh_input.tsh point.xya mesh_output.tsh [expand|no_expand][vervose|non_verbose] [alpha] [display_errors|no_display_errors]"\
    12681268            %os.path.basename(sys.argv[0])
    12691269
     
    12941294            alpha = DEFAULT_ALPHA
    12951295
     1296        # This is used more for testing
     1297        if len(sys.argv) > 7:
     1298            if sys.argv[7][0] == "n" or sys.argv[5][0] == "N":
     1299                display_errors = False
     1300            else:
     1301                display_errors = True
     1302           
    12961303        t0 = time.time()
    12971304        try:
     
    13011308                         alpha,
    13021309                         verbose= verbose,
    1303                          expand_search = expand_search)
     1310                         expand_search = expand_search,
     1311                         display_errors = display_errors)
    13041312        except IOError,e:
    1305             import sys; sys.exit()
     1313            import sys; sys.exit(1)
    13061314
    13071315        print 'That took %.2f seconds' %(time.time()-t0)
Note: See TracChangeset for help on using the changeset viewer.