Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NetCDF tests failing #3308

Closed
max-sixty opened this issue Sep 13, 2019 · 4 comments
Closed

NetCDF tests failing #3308

max-sixty opened this issue Sep 13, 2019 · 4 comments

Comments

@max-sixty
Copy link
Collaborator

max-sixty commented Sep 13, 2019

(edit: original failure was mistaken)
Does anyone know off hand why this is failing?

ResolvePackageNotFound: 
  - pandas=0.19
  - python=3.5.0

Worst case we could drop it... #3293

@max-sixty max-sixty changed the title 3.5 tests failing with conda 3.5 tests failing at conda install Sep 13, 2019
@crusaderky
Copy link
Contributor

Looks like a very old fork, the min python version in master is 3.5.3. Try merging master in...

@max-sixty max-sixty changed the title 3.5 tests failing at conda install NetCDF tests failing Sep 13, 2019
@max-sixty
Copy link
Collaborator Author

Thanks @crusaderky, I was confusing for another failure. This is the failure on master:

_____________ TestH5NetCDFData.test_complex[None-FutureWarning-1] ______________

self = <xarray.tests.test_backends.TestH5NetCDFData object at 0x7f39ad21e358>
invalid_netcdf = None, warns = <class 'FutureWarning'>, num_warns = 1

    @pytest.mark.filterwarnings("ignore:complex dtypes are supported by h5py")
    @pytest.mark.parametrize(
        "invalid_netcdf, warns, num_warns",
        [(None, FutureWarning, 1), (False, FutureWarning, 1), (True, None, 0)],
    )
    def test_complex(self, invalid_netcdf, warns, num_warns):
        expected = Dataset({"x": ("y", np.ones(5) + 1j * np.ones(5))})
        save_kwargs = {"invalid_netcdf": invalid_netcdf}
        with pytest.warns(warns) as record:
            with self.roundtrip(expected, save_kwargs=save_kwargs) as actual:
                assert_equal(expected, actual)
>       assert len(record) == num_warns
E       assert 2 == 1
E        +  where 2 = len(WarningsChecker(record=True))

xarray/tests/test_backends.py:2185: AssertionError
_____________ TestH5NetCDFData.test_complex[False-FutureWarning-1] _____________

self = <xarray.tests.test_backends.TestH5NetCDFData object at 0x7f39ae3fc668>
invalid_netcdf = False, warns = <class 'FutureWarning'>, num_warns = 1

    @pytest.mark.filterwarnings("ignore:complex dtypes are supported by h5py")
    @pytest.mark.parametrize(
        "invalid_netcdf, warns, num_warns",
        [(None, FutureWarning, 1), (False, FutureWarning, 1), (True, None, 0)],
    )
    def test_complex(self, invalid_netcdf, warns, num_warns):
        expected = Dataset({"x": ("y", np.ones(5) + 1j * np.ones(5))})
        save_kwargs = {"invalid_netcdf": invalid_netcdf}
        with pytest.warns(warns) as record:
            with self.roundtrip(expected, save_kwargs=save_kwargs) as actual:
                assert_equal(expected, actual)
>       assert len(record) == num_warns
E       assert 2 == 1
E        +  where 2 = len(WarningsChecker(record=True))

xarray/tests/test_backends.py:2185: AssertionError
__________________ TestH5NetCDFData.test_complex[True-None-0] __________________

self = <xarray.tests.test_backends.TestH5NetCDFData object at 0x7f39ad2058d0>
invalid_netcdf = True, warns = None, num_warns = 0

    @pytest.mark.filterwarnings("ignore:complex dtypes are supported by h5py")
    @pytest.mark.parametrize(
        "invalid_netcdf, warns, num_warns",
        [(None, FutureWarning, 1), (False, FutureWarning, 1), (True, None, 0)],
    )
    def test_complex(self, invalid_netcdf, warns, num_warns):
        expected = Dataset({"x": ("y", np.ones(5) + 1j * np.ones(5))})
        save_kwargs = {"invalid_netcdf": invalid_netcdf}
        with pytest.warns(warns) as record:
            with self.roundtrip(expected, save_kwargs=save_kwargs) as actual:
                assert_equal(expected, actual)
>       assert len(record) == num_warns
E       assert 1 == 0
E        +  where 1 = len(WarningsChecker(record=True))

xarray/tests/test_backends.py:2185: AssertionError
__________ TestH5NetCDFFileObject.test_complex[None-FutureWarning-1] ___________

self = <xarray.tests.test_backends.TestH5NetCDFFileObject object at 0x7f39ad7402e8>
invalid_netcdf = None, warns = <class 'FutureWarning'>, num_warns = 1

    @pytest.mark.filterwarnings("ignore:complex dtypes are supported by h5py")
    @pytest.mark.parametrize(
        "invalid_netcdf, warns, num_warns",
        [(None, FutureWarning, 1), (False, FutureWarning, 1), (True, None, 0)],
    )
    def test_complex(self, invalid_netcdf, warns, num_warns):
        expected = Dataset({"x": ("y", np.ones(5) + 1j * np.ones(5))})
        save_kwargs = {"invalid_netcdf": invalid_netcdf}
        with pytest.warns(warns) as record:
            with self.roundtrip(expected, save_kwargs=save_kwargs) as actual:
                assert_equal(expected, actual)
>       assert len(record) == num_warns
E       assert 2 == 1
E        +  where 2 = len(WarningsChecker(record=True))

xarray/tests/test_backends.py:2185: AssertionError
__________ TestH5NetCDFFileObject.test_complex[False-FutureWarning-1] __________

self = <xarray.tests.test_backends.TestH5NetCDFFileObject object at 0x7f39ad545940>
invalid_netcdf = False, warns = <class 'FutureWarning'>, num_warns = 1

    @pytest.mark.filterwarnings("ignore:complex dtypes are supported by h5py")
    @pytest.mark.parametrize(
        "invalid_netcdf, warns, num_warns",
        [(None, FutureWarning, 1), (False, FutureWarning, 1), (True, None, 0)],
    )
    def test_complex(self, invalid_netcdf, warns, num_warns):
        expected = Dataset({"x": ("y", np.ones(5) + 1j * np.ones(5))})
        save_kwargs = {"invalid_netcdf": invalid_netcdf}
        with pytest.warns(warns) as record:
            with self.roundtrip(expected, save_kwargs=save_kwargs) as actual:
                assert_equal(expected, actual)
>       assert len(record) == num_warns
E       assert 2 == 1
E        +  where 2 = len(WarningsChecker(record=True))

xarray/tests/test_backends.py:2185: AssertionError
_______________ TestH5NetCDFFileObject.test_complex[True-None-0] _______________

self = <xarray.tests.test_backends.TestH5NetCDFFileObject object at 0x7f39ae20ae80>
invalid_netcdf = True, warns = None, num_warns = 0

    @pytest.mark.filterwarnings("ignore:complex dtypes are supported by h5py")
    @pytest.mark.parametrize(
        "invalid_netcdf, warns, num_warns",
        [(None, FutureWarning, 1), (False, FutureWarning, 1), (True, None, 0)],
    )
    def test_complex(self, invalid_netcdf, warns, num_warns):
        expected = Dataset({"x": ("y", np.ones(5) + 1j * np.ones(5))})
        save_kwargs = {"invalid_netcdf": invalid_netcdf}
        with pytest.warns(warns) as record:
            with self.roundtrip(expected, save_kwargs=save_kwargs) as actual:
                assert_equal(expected, actual)
>       assert len(record) == num_warns
E       assert 1 == 0
E        +  where 1 = len(WarningsChecker(record=True))

xarray/tests/test_backends.py:2185: AssertionError
__________ TestH5NetCDFViaDaskData.test_complex[None-FutureWarning-1] __________

self = <xarray.tests.test_backends.TestH5NetCDFViaDaskData object at 0x7f39ad740b70>
invalid_netcdf = None, warns = <class 'FutureWarning'>, num_warns = 1

    @pytest.mark.filterwarnings("ignore:complex dtypes are supported by h5py")
    @pytest.mark.parametrize(
        "invalid_netcdf, warns, num_warns",
        [(None, FutureWarning, 1), (False, FutureWarning, 1), (True, None, 0)],
    )
    def test_complex(self, invalid_netcdf, warns, num_warns):
        expected = Dataset({"x": ("y", np.ones(5) + 1j * np.ones(5))})
        save_kwargs = {"invalid_netcdf": invalid_netcdf}
        with pytest.warns(warns) as record:
            with self.roundtrip(expected, save_kwargs=save_kwargs) as actual:
                assert_equal(expected, actual)
>       assert len(record) == num_warns
E       assert 2 == 1
E        +  where 2 = len(WarningsChecker(record=True))

xarray/tests/test_backends.py:2185: AssertionError
_________ TestH5NetCDFViaDaskData.test_complex[False-FutureWarning-1] __________

self = <xarray.tests.test_backends.TestH5NetCDFViaDaskData object at 0x7f39ae4a8d30>
invalid_netcdf = False, warns = <class 'FutureWarning'>, num_warns = 1

    @pytest.mark.filterwarnings("ignore:complex dtypes are supported by h5py")
    @pytest.mark.parametrize(
        "invalid_netcdf, warns, num_warns",
        [(None, FutureWarning, 1), (False, FutureWarning, 1), (True, None, 0)],
    )
    def test_complex(self, invalid_netcdf, warns, num_warns):
        expected = Dataset({"x": ("y", np.ones(5) + 1j * np.ones(5))})
        save_kwargs = {"invalid_netcdf": invalid_netcdf}
        with pytest.warns(warns) as record:
            with self.roundtrip(expected, save_kwargs=save_kwargs) as actual:
                assert_equal(expected, actual)
>       assert len(record) == num_warns
E       assert 2 == 1
E        +  where 2 = len(WarningsChecker(record=True))

xarray/tests/test_backends.py:2185: AssertionError
______________ TestH5NetCDFViaDaskData.test_complex[True-None-0] _______________

self = <xarray.tests.test_backends.TestH5NetCDFViaDaskData object at 0x7f39ad4ee3c8>
invalid_netcdf = True, warns = None, num_warns = 0

    @pytest.mark.filterwarnings("ignore:complex dtypes are supported by h5py")
    @pytest.mark.parametrize(
        "invalid_netcdf, warns, num_warns",
        [(None, FutureWarning, 1), (False, FutureWarning, 1), (True, None, 0)],
    )
    def test_complex(self, invalid_netcdf, warns, num_warns):
        expected = Dataset({"x": ("y", np.ones(5) + 1j * np.ones(5))})
        save_kwargs = {"invalid_netcdf": invalid_netcdf}
        with pytest.warns(warns) as record:
            with self.roundtrip(expected, save_kwargs=save_kwargs) as actual:
                assert_equal(expected, actual)
>       assert len(record) == num_warns
E       assert 1 == 0
E        +  where 1 = len(WarningsChecker(record=True))

xarray/tests/test_backends.py:2185: AssertionError

@dcherian
Copy link
Contributor

This is #3300 which is fixed by #3301

@max-sixty
Copy link
Collaborator Author

Thanks @dcherian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants