-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #388 from euroargodev/deprec-before-major
Introduces deprecation warnings before major v1.0.0 release
- Loading branch information
Showing
6 changed files
with
203 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import logging | ||
import pytest | ||
from mocked_http import mocked_server_address | ||
from mocked_http import mocked_httpserver as mocked_erddapserver | ||
|
||
import argopy | ||
from utils import ( | ||
requires_erddap, | ||
) | ||
|
||
|
||
log = logging.getLogger("argopy.tests.deprecated") | ||
|
||
|
||
def test_deprecated_option_dataset(): | ||
with pytest.deprecated_call(): | ||
argopy.set_options(dataset='phy') | ||
|
||
|
||
def test_deprecated_option_ftp(): | ||
with pytest.deprecated_call(): | ||
argopy.set_options(ftp='https://data-argo.ifremer.fr') | ||
|
||
|
||
def test_deprecated_fetcher_argument_ftp(): | ||
with pytest.deprecated_call(): | ||
argopy.DataFetcher(src='gdac', ftp='https://data-argo.ifremer.fr') | ||
|
||
@requires_erddap | ||
def test_deprecated_accessor_filter_data_mode(mocked_erddapserver): | ||
with pytest.deprecated_call(): | ||
ds = argopy.DataFetcher(src='erddap', mode='expert', server=mocked_server_address).profile(6902746, 34).to_xarray() | ||
ds.argo.filter_data_mode() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters