@@ -61,7 +61,6 @@ def assert_dicts_identical(dict1, dict2):
61
61
62
62
63
63
def test_repr () -> None :
64
-
65
64
assert "air_temperature: [(1, 2, 3)]" in ds_with_tuple .cf .__repr__ ()
66
65
67
66
# Dataset.
@@ -454,7 +453,6 @@ def test_rename_like() -> None:
454
453
),
455
454
)
456
455
def test_wrapped_classes (obj , attr , xrkwargs , cfkwargs ):
457
-
458
456
if attr in ("rolling" , "coarsen" ):
459
457
# TODO: xarray bug, rolling and coarsen don't accept ellipsis
460
458
args = ()
@@ -522,7 +520,6 @@ def test_pos_args_methods() -> None:
522
520
523
521
524
522
def test_preserve_unused_keys () -> None :
525
-
526
523
ds = airds .copy (deep = False )
527
524
ds .time .attrs .clear ()
528
525
actual = ds .cf .sel (X = 260 , Y = 40 , time = airds .time [:2 ], method = "nearest" )
@@ -531,7 +528,6 @@ def test_preserve_unused_keys() -> None:
531
528
532
529
533
530
def test_kwargs_expand_key_to_multiple_keys () -> None :
534
-
535
531
actual = multiple .cf .isel (X = 5 , Y = 3 )
536
532
expected = multiple .isel (x1 = 5 , y1 = 3 , x2 = 5 , y2 = 3 )
537
533
assert_identical (actual , expected )
@@ -571,7 +567,6 @@ def test_args_methods(obj):
571
567
572
568
573
569
def test_dataarray_getitem () -> None :
574
-
575
570
air = airds .air .copy (deep = False )
576
571
air .name = None
577
572
@@ -586,7 +581,6 @@ def test_dataarray_getitem() -> None:
586
581
587
582
588
583
def test_dataarray_plot () -> None :
589
-
590
584
obj = airds .air .copy (deep = False )
591
585
592
586
rv = obj .isel (time = 1 ).transpose ("lon" , "lat" ).cf .plot ()
@@ -1375,7 +1369,6 @@ def test_standard_name_mapper() -> None:
1375
1369
@pytest .mark .parametrize ("obj" , objects )
1376
1370
@pytest .mark .parametrize ("attr" , ["drop_vars" , "set_coords" ])
1377
1371
def test_drop_vars_and_set_coords (obj , attr ):
1378
-
1379
1372
# DataArray object has no attribute set_coords
1380
1373
if not isinstance (obj , Dataset ) and attr == "set_coords" :
1381
1374
return
@@ -1398,7 +1391,6 @@ def test_drop_vars_and_set_coords(obj, attr):
1398
1391
1399
1392
@pytest .mark .parametrize ("obj" , objects )
1400
1393
def test_drop_sel_and_reset_coords (obj ):
1401
-
1402
1394
# Axis
1403
1395
assert_identical (obj .drop_sel (lat = 75 ), obj .cf .drop_sel (Y = 75 ))
1404
1396
# Coordinate
@@ -1415,7 +1407,6 @@ def test_drop_sel_and_reset_coords(obj):
1415
1407
1416
1408
@pytest .mark .parametrize ("ds" , datasets )
1417
1409
def test_drop_dims (ds ):
1418
-
1419
1410
# Add data_var and coord to test _get_dims
1420
1411
ds ["lon_var" ] = ds ["lon" ]
1421
1412
ds = ds .assign_coords (lon_coord = ds ["lon" ])
@@ -1427,7 +1418,6 @@ def test_drop_dims(ds):
1427
1418
1428
1419
@pytest .mark .parametrize ("obj" , objects )
1429
1420
def test_rename (obj ):
1430
-
1431
1421
cf_dict = {
1432
1422
"air_temperature" if isinstance (obj , Dataset ) else "longitude" : "renamed"
1433
1423
}
@@ -1450,7 +1440,6 @@ def test_rename_tuple():
1450
1440
1451
1441
@pytest .mark .parametrize ("ds" , datasets )
1452
1442
def test_differentiate (ds ):
1453
-
1454
1443
# Add data_var and coord to test _get_coords
1455
1444
ds ["lon_var" ] = ds ["lon" ]
1456
1445
ds = ds .assign_coords (lon_coord = ds ["lon" ])
@@ -1710,7 +1699,6 @@ def test_regex_match():
1710
1699
1711
1700
1712
1701
def test_cf_standard_name_table_version () -> None :
1713
-
1714
1702
url = (
1715
1703
"https://raw.githubusercontent.com/cf-convention/cf-convention.github.io/"
1716
1704
"master/Data/cf-standard-names/current/src/cf-standard-name-table.xml"
@@ -1748,7 +1736,6 @@ def test_datetime_like(reshape):
1748
1736
@pytest .mark .parametrize ("skip" , ["units" , None ])
1749
1737
@pytest .mark .parametrize ("verbose" , [True , False ])
1750
1738
def test_add_canonical_attributes (override , skip , verbose , capsys ):
1751
-
1752
1739
ds = airds
1753
1740
original = ds .copy (deep = True )
1754
1741
cf_ds = ds .cf .add_canonical_attributes (
@@ -1834,7 +1821,6 @@ def test_flag_errors() -> None:
1834
1821
1835
1822
1836
1823
def test_missing_variables () -> None :
1837
-
1838
1824
# Bounds
1839
1825
ds = mollwds .copy (deep = False )
1840
1826
ds = ds .drop_vars ("lon_bounds" )
0 commit comments