Skip to content

Broken test test_globcurrent_time_extrapolation_error #1737

@VeckoTheGecko

Description

@VeckoTheGecko

I'm working on removing xfail from some tests so that we can use pytest.raises instead so that we're more specific. The following test

https://github.com/OceanParcels/Parcels/blob/aa716e44128b5eaaaac503dfb924a0539102f2ae/docs/examples/example_globcurrent.py#L222-L238

errors with

    @pytest.mark.parametrize("mode", ["scipy", "jit"])
    @pytest.mark.parametrize("use_xarray", [True, False])
    def test_globcurrent_time_extrapolation_error(mode, use_xarray):
        fieldset = set_globcurrent_fieldset(use_xarray=use_xarray)
    
        pset = parcels.ParticleSet(
            fieldset,
            pclass=ptype[mode],
            lon=[25],
            lat=[-35],
>           time=fieldset.U.time[0] - timedelta(days=1).total_seconds(),
        )
E       AttributeError: 'Field' object has no attribute 'time'

docs/examples/example_globcurrent.py:233: AttributeError
________________________________________ test_globcurrent_time_extrapolation_error[False-jit] _____

This is a broken test

(imo, xfail should be reserved for features that are not yet implemented, or platform incompatability, etc)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions