Skip to content

Commit

Permalink
Update test_fetchers_dask_cluster.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gmaze committed Oct 11, 2024
1 parent aac32bc commit 07922b2
Showing 1 changed file with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
import pytest
import logging

dask = pytest.importorskip("dask", reason="Requires 'Dask' and 'distributed'")
distributed = pytest.importorskip("distributed", reason="Requires 'Dask' and 'distributed'")
from dask.distributed import Client


import logging
from argopy import DataFetcher
from collections import ChainMap
import xarray as xr

from mocked_http import mocked_server_address, mocked_httpserver

from utils import (
requires_argovis,
requires_erddap,
requires_gdac,
has_dask, has_distributed,
)

log = logging.getLogger("argopy.tests.dask")
USE_MOCKED_SERVER = True
Expand Down Expand Up @@ -72,6 +81,9 @@ def core(fargs, apts):
return fetcher


@requires_erddap
@requires_gdac
@requires_argovis
class Test_Backend:
"""Test Dask cluster parallelization"""

Expand Down Expand Up @@ -129,10 +141,7 @@ def teardown_class(self):
indirect=True,
ids=VALID_PARALLEL_ACCESS_POINTS_IDS,
)
def test_fetching_erddap(self, mocked_httpserver, fetcher):
# log.debug(fetcher)
# log.debug(len(fetcher.uri))
# log.debug(fetcher.uri)
def test_data_fetching(self, mocked_httpserver, fetcher):
assert len(fetcher.uri) > 1

ds = fetcher.to_xarray()
Expand Down

0 comments on commit 07922b2

Please sign in to comment.