Skip to content

Commit

Permalink
Merge pull request #1720 from Unidata/dependabot-pip-ci-flake8-simpli…
Browse files Browse the repository at this point in the history
…fy-0.14.0

MNT: (deps): Bump flake8-simplify from 0.12.0 to 0.14.0 in /ci
  • Loading branch information
dopplershift committed Feb 24, 2021
2 parents 0d83d1a + 4d23c7b commit c29b78d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion ci/linting_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ flake8-mutable==1.2.0
flake8-pep3101==1.3.0
flake8-print==4.0.0
flake8-quotes==3.2.0
flake8-simplify==0.12.0
flake8-simplify==0.14.0
pep8-naming==0.11.1

flake8-rst-docstrings==0.0.14
Expand Down
30 changes: 15 additions & 15 deletions tests/test_xarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,12 +376,12 @@ def test_resolve_axis_conflict_double_lonlat(test_ds_generic):
test_ds_generic['d'].attrs['_CoordinateAxisType'] = 'Lat'
test_ds_generic['e'].attrs['_CoordinateAxisType'] = 'Lon'

with pytest.warns(UserWarning, match='More than one x coordinate'):
with pytest.raises(AttributeError):
test_ds_generic['test'].metpy.x
with pytest.warns(UserWarning, match='More than one y coordinate'):
with pytest.raises(AttributeError):
test_ds_generic['test'].metpy.y
with pytest.warns(UserWarning, match='More than one x coordinate'),\
pytest.raises(AttributeError):
test_ds_generic['test'].metpy.x
with pytest.warns(UserWarning, match='More than one y coordinate'),\
pytest.raises(AttributeError):
test_ds_generic['test'].metpy.y


def test_resolve_axis_conflict_double_xy(test_ds_generic):
Expand All @@ -391,12 +391,12 @@ def test_resolve_axis_conflict_double_xy(test_ds_generic):
test_ds_generic['d'].attrs['standard_name'] = 'projection_x_coordinate'
test_ds_generic['e'].attrs['standard_name'] = 'projection_y_coordinate'

with pytest.warns(UserWarning, match='More than one x coordinate'):
with pytest.raises(AttributeError):
test_ds_generic['test'].metpy.x
with pytest.warns(UserWarning, match='More than one y coordinate'):
with pytest.raises(AttributeError):
test_ds_generic['test'].metpy.y
with pytest.warns(UserWarning, match='More than one x coordinate'),\
pytest.raises(AttributeError):
test_ds_generic['test'].metpy.x
with pytest.warns(UserWarning, match='More than one y coordinate'),\
pytest.raises(AttributeError):
test_ds_generic['test'].metpy.y


def test_resolve_axis_conflict_double_x_with_single_dim(test_ds_generic):
Expand All @@ -413,9 +413,9 @@ def test_resolve_axis_conflict_double_vertical(test_ds_generic):
test_ds_generic['b'].attrs['units'] = 'hPa'
test_ds_generic['c'].attrs['units'] = 'Pa'

with pytest.warns(UserWarning, match='More than one vertical coordinate'):
with pytest.raises(AttributeError):
test_ds_generic['test'].metpy.vertical
with pytest.warns(UserWarning, match='More than one vertical coordinate'),\
pytest.raises(AttributeError):
test_ds_generic['test'].metpy.vertical


criterion_matches = [
Expand Down

0 comments on commit c29b78d

Please sign in to comment.