Changeset 5119


Ignore:
Timestamp:
Mar 4, 2008, 5:33:38 PM (16 years ago)
Author:
ole
Message:

Fiddling

Location:
anuga_core/source/anuga
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/shallow_water/test_shallow_water_domain.py

    r5117 r5119  
    13981398            raise msg
    13991399
    1400         #Cleanup
    1401         os.remove(domain.get_name() + '.' + domain.format)
     1400        # Cleanup
     1401        try:
     1402            os.remove(domain.get_name() + '.' + domain.format)
     1403        except:
     1404            pass
     1405            #FIXME(Ole): Windows won't allow removal of this
     1406           
    14021407       
    14031408
  • anuga_core/source/anuga/utilities/test_polygon.py

    r5086 r5119  
    4949
    5050        f = Polygon_function( [(p2, 2.0)] )
    51         z = f([5, 5, 27, 35], [5, 9, 8, -5]) #First and last inside p2
     51        z = f([5, 5, 27, 35], [5, 9, 8, -5]) # First and last inside p2
    5252        assert allclose(z, [2,0,0,2])
    5353
     
    7070
    7171        f = Polygon_function( [(p1, 10.0)] )
    72         z = f([430000,480000], [490000,7720000]) #first outside, second inside
     72        z = f([430000,480000], [490000,7720000]) # first outside, second inside
    7373       
    7474        assert allclose(z, [0,10])
     
    8282        geo = Geo_reference(56, 200, 1000)
    8383
    84         #Make points 'absolute'
     84        # Make points 'absolute'
    8585        p1 = [[200,1000], [210,1000], [210,1010], [200,1010]]
    8686        p2 = [[200,1000], [210,1010], [215,1005], [220, 1010], [225,1000],
    8787              [230,1010], [240,990]]
    8888
    89         f = Polygon_function( [(p1, 1.0)], geo_reference = geo )
     89        f = Polygon_function( [(p1, 1.0)], geo_reference=geo)
    9090        z = f([5, 5, 27, 35], [5, 9, 8, -5]) #Two first inside p1
    9191
     
    9393
    9494
    95         f = Polygon_function( [(p2, 2.0)], geo_reference = geo )
     95        f = Polygon_function( [(p2, 2.0)], geo_reference=geo)
    9696        z = f([5, 5, 27, 35], [5, 9, 8, -5]) #First and last inside p2
    9797        assert allclose(z, [2,0,0,2])
    9898
    9999
    100         #Combined
    101         f = Polygon_function( [(p1, 1.0), (p2, 2.0)], geo_reference = geo )
     100        # Combined
     101        f = Polygon_function( [(p1, 1.0), (p2, 2.0)], geo_reference=geo)
    102102        z = f([5, 5, 27, 35], [5, 9, 8, -5])
    103103        assert allclose(z, [2,1,0,2])
    104104
    105105
    106         #Check that it would fail without geo
     106        # Check that it would fail without geo
    107107        f = Polygon_function( [(p1, 1.0), (p2, 2.0)])
    108108        z = f([5, 5, 27, 35], [5, 9, 8, -5])
     
    122122        assert allclose(z, [10,14,0,0])
    123123
    124         #Combined
     124        # Combined
    125125        f = Polygon_function( [(p1, test_function), (p2, 2.0)] )
    126126        z = f([5, 5, 27, 35], [5, 9, 8, -5])
     
    128128
    129129
    130         #Combined w default
     130        # Combined w default
    131131        f = Polygon_function( [(p1, test_function), (p2, 2.0)], default = 3.14)
    132132        z = f([5, 5, 27, 35], [5, 9, 8, -5])
     
    134134
    135135
    136         #Combined w default func
     136        # Combined w default func
    137137        f = Polygon_function( [(p1, test_function), (p2, 2.0)],
    138138                              default = test_function)
Note: See TracChangeset for help on using the changeset viewer.