def METHOD_NAME():
    """Test writing of a quantity.
    """
    tmpfile = tempfile.NamedTemporaryFile()
    storage = NetCDFStorage(tmpfile.name, mode='w')
    view = NetCDFStorageView(storage, 'envname', 'modname')
    view.write_quantity('singleton', 1.0)
    for iteration in range(10):
        view.write_quantity('varname', float(iteration), iteration=iteration)
    for iteration in range(10):
        assert (storage._ncfile['/envname/modname/varname'][iteration] == float(iteration))