forked from pydata/xarray
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into missing_value
* upstream/master: cfgrib is now part of conda-forge (pydata#2992) Add fill_value for concat and auto_combine (pydata#2964) Remove deprecated pytest.config usages (pydata#2988) Add transpose_coords option to DataArray.transpose (pydata#2556) Fix rolling.constuct() example (pydata#2967) Implement load_dataset() and load_dataarray() (pydata#2917)
- Loading branch information
Showing
21 changed files
with
341 additions
and
95 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,29 @@ | ||
"""Configuration for pytest.""" | ||
|
||
import pytest | ||
|
||
|
||
def pytest_addoption(parser): | ||
"""Add command-line flags for pytest.""" | ||
parser.addoption("--run-flaky", action="store_true", | ||
help="runs flaky tests") | ||
parser.addoption("--run-network-tests", action="store_true", | ||
help="runs tests requiring a network connection") | ||
|
||
|
||
def pytest_collection_modifyitems(config, items): | ||
|
||
if not config.getoption("--run-flaky"): | ||
skip_flaky = pytest.mark.skip( | ||
reason="set --run-flaky option to run flaky tests") | ||
for item in items: | ||
if "flaky" in item.keywords: | ||
item.add_marker(skip_flaky) | ||
|
||
if not config.getoption("--run-network-tests"): | ||
skip_network = pytest.mark.skip( | ||
reason="set --run-network-tests option to run tests requiring an" | ||
"internet connection") | ||
for item in items: | ||
if "network" in item.keywords: | ||
item.add_marker(skip_network) |
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
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
Oops, something went wrong.