示例#1
0
def test_add_attributes():
    d = UVar('depth', location='node', data=[1.0, 2.0, 3.0, 4.0])
    d.attributes = {'standard_name': 'sea_floor_depth_below_geoid',
                    'units': 'm',
                    'positive': 'down'}
    assert d.attributes['units'] == 'm'
    assert d.attributes['positive'] == 'down'
示例#2
0
def add_attributes():
    d = UVar('depth', location='node', data=[1.0, 2.0, 3.0, 4.0])

    d.attributes = {"standard_name" : "sea_floor_depth_below_geoid",
                    "units" : "m",
                    "positive" : "down",
                    }

    assert d.attributes['units'] == 'm'
    assert d.attributes['posative'] == 'down'