Skip to content

Commit

Permalink
try to see if pytest xfail runs with gj on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mathleur committed Sep 13, 2024
1 parent 51737ef commit e690549
Show file tree
Hide file tree
Showing 22 changed files with 47 additions and 54 deletions.
2 changes: 1 addition & 1 deletion tests/test_cyclic_nearest.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def find_nearest_latlon(self, grib_file, target_lat, target_lon):

return nearest_points

@pytest.mark.fdb
@pytest.mark.xfail
@pytest.mark.internet
def test_regular_grid(self):
import pygribjump as gj
Expand Down
8 changes: 4 additions & 4 deletions tests/test_ecmwf_oper_data_fdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def setup_method(self, method):
}

# Testing different shapes
@pytest.mark.fdb
@pytest.mark.xfail
def test_fdb_datacube(self):
import pygribjump as gj

Expand Down Expand Up @@ -70,7 +70,7 @@ def test_fdb_datacube(self):
assert len(result.leaves) == 3
assert len(result.leaves[0].result) == 3

@pytest.mark.fdb
@pytest.mark.xfail
def test_fdb_datacube_point(self):
import pygribjump as gj

Expand Down Expand Up @@ -99,7 +99,7 @@ def test_fdb_datacube_point(self):
assert set(result.leaves[0].flatten()["step"]) == set((0, 1))
assert len(result.leaves[0].result) == 4

@pytest.mark.fdb
@pytest.mark.xfail
def test_fdb_datacube_point_v2(self):
import pygribjump as gj

Expand Down Expand Up @@ -127,7 +127,7 @@ def test_fdb_datacube_point_v2(self):
assert len(result.leaves) == 3
assert len(result.leaves[0].result) == 4

@pytest.mark.fdb
@pytest.mark.xfail
def test_fdb_datacube_point_step_not_compressed(self):
import pygribjump as gj

Expand Down
6 changes: 0 additions & 6 deletions tests/test_engine_slicer.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,12 @@ def test_triangle(self):
result = self.slicer.extract(datacube, triangle)
result.pprint()
assert len(result.leaves) == 10
# assert len(result.leaves) == 4
# total_leaves = 0
# for leaf in result.leaves:
# total_leaves += len(leaf.values)
# assert total_leaves == 4 + 3 + 2 + 1

def test_reusable(self):
datacube = MockDatacube({"x": 100, "y": 100})
polytopes = Polygon(["x", "y"], [[3, 3], [3, 6], [6, 3]]).polytope()
result = self.slicer.extract(datacube, polytopes)
result.pprint()
# assert len(result.leaves) == 4
assert len(result.leaves) == 10
polytopes = Box(["x", "y"], lower_corner=[3, 3], upper_corner=[6, 6]).polytope()
result = self.slicer.extract(datacube, polytopes)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_fdb_datacube.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def setup_method(self, method):
}

# Testing different shapes
@pytest.mark.fdb
@pytest.mark.xfail
def test_fdb_datacube(self):
import pygribjump as gj

Expand Down Expand Up @@ -96,7 +96,7 @@ def test_fdb_datacube(self):
# plt.colorbar(label="Temperature")
# plt.show()

@pytest.mark.fdb
@pytest.mark.xfail
def test_fdb_datacube_select_grid(self):
import pygribjump as gj

Expand Down
2 changes: 1 addition & 1 deletion tests/test_fdb_unmap_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def setup_method(self, method):
}

# Testing different shapes
@pytest.mark.fdb
@pytest.mark.xfail
def test_fdb_datacube(self):
import pygribjump as gj

Expand Down
2 changes: 1 addition & 1 deletion tests/test_healpix_nested_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def setup_method(self, method):
}

@pytest.mark.internet
@pytest.mark.fdb
@pytest.mark.xfail
@pytest.mark.skip(reason="different fdb schema for climate dt")
def test_healpix_nested_grid(self):
import pygribjump as gj
Expand Down
4 changes: 2 additions & 2 deletions tests/test_incomplete_tree_fdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def setup_method(self, method):
}

@pytest.mark.internet
@pytest.mark.fdb
@pytest.mark.xfail
def test_incomplete_fdb_branch(self):
import pygribjump as gj

Expand Down Expand Up @@ -79,7 +79,7 @@ def test_incomplete_fdb_branch(self):
assert result.is_root()

@pytest.mark.internet
@pytest.mark.fdb
@pytest.mark.xfail
def test_incomplete_fdb_branch_2(self):
import pygribjump as gj

Expand Down
4 changes: 2 additions & 2 deletions tests/test_local_grid_cyclic.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def setup_method(self, method):
}

# Testing different shapes
@pytest.mark.fdb
@pytest.mark.xfail
def test_fdb_datacube(self):
import pygribjump as gj

Expand Down Expand Up @@ -78,7 +78,7 @@ def test_fdb_datacube(self):
assert result.leaves[0].flatten()["latitude"] == (-20,)
assert result.leaves[0].flatten()["longitude"] == (-20,)

@pytest.mark.fdb
@pytest.mark.xfail
def test_fdb_datacube_2(self):
import pygribjump as gj

Expand Down
20 changes: 10 additions & 10 deletions tests/test_local_regular_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def setup_method(self, method):
}

# Testing different shapes
@pytest.mark.fdb
@pytest.mark.xfail
def test_fdb_datacube(self):
import pygribjump as gj

Expand Down Expand Up @@ -77,7 +77,7 @@ def test_fdb_datacube(self):
assert result.leaves[0].flatten()["latitude"] == (0,)
assert result.leaves[0].flatten()["longitude"] == (0,)

@pytest.mark.fdb
@pytest.mark.xfail
def test_point_outside_local_region(self):
import pygribjump as gj

Expand Down Expand Up @@ -106,7 +106,7 @@ def test_point_outside_local_region(self):
assert result.leaves[0].flatten()["latitude"] == (0,)
assert result.leaves[0].flatten()["longitude"] == (60,)

@pytest.mark.fdb
@pytest.mark.xfail
def test_point_outside_local_region_2(self):
import pygribjump as gj

Expand Down Expand Up @@ -135,7 +135,7 @@ def test_point_outside_local_region_2(self):
assert result.leaves[0].flatten()["latitude"] == (40,)
assert result.leaves[0].flatten()["longitude"] == (1,)

@pytest.mark.fdb
@pytest.mark.xfail
def test_point_outside_local_region_3(self):
import pygribjump as gj

Expand Down Expand Up @@ -163,7 +163,7 @@ def test_point_outside_local_region_3(self):
assert len(result.leaves) == 1
assert result.is_root()

@pytest.mark.fdb
@pytest.mark.xfail
def test_point_outside_local_region_4(self):
import pygribjump as gj

Expand Down Expand Up @@ -191,7 +191,7 @@ def test_point_outside_local_region_4(self):
assert len(result.leaves) == 1
assert result.is_root()

@pytest.mark.fdb
@pytest.mark.xfail
def test_point_outside_local_region_5(self):
import pygribjump as gj

Expand Down Expand Up @@ -219,7 +219,7 @@ def test_point_outside_local_region_5(self):
assert len(result.leaves) == 1
assert result.is_root()

@pytest.mark.fdb
@pytest.mark.xfail
def test_point_outside_local_region_6(self):
import pygribjump as gj

Expand Down Expand Up @@ -247,7 +247,7 @@ def test_point_outside_local_region_6(self):
assert len(result.leaves) == 1
assert result.is_root()

@pytest.mark.fdb
@pytest.mark.xfail
def test_point_outside_local_region_7(self):
import pygribjump as gj

Expand Down Expand Up @@ -276,7 +276,7 @@ def test_point_outside_local_region_7(self):
assert result.leaves[0].flatten()["latitude"] == (-40,)
assert result.leaves[0].flatten()["longitude"] == (1,)

@pytest.mark.fdb
@pytest.mark.xfail
def test_point_outside_local_region_8(self):
import pygribjump as gj

Expand Down Expand Up @@ -305,7 +305,7 @@ def test_point_outside_local_region_8(self):
assert result.leaves[0].flatten()["latitude"] == (-30,)
assert result.leaves[0].flatten()["longitude"] == (-20,)

@pytest.mark.fdb
@pytest.mark.xfail
def test_point_outside_local_region_9(self):
import pygribjump as gj

Expand Down
2 changes: 1 addition & 1 deletion tests/test_local_swiss_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def setup_method(self, method):
}

# Testing different shapes
@pytest.mark.fdb
@pytest.mark.xfail
@pytest.mark.skip("Non-accessible data")
def test_fdb_datacube(self):
import pygribjump as gj
Expand Down
1 change: 0 additions & 1 deletion tests/test_multiple_param_fdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def setup_method(self, method):
}

# Testing different shapes
# @pytest.mark.fdb
@pytest.mark.xfail
def test_fdb_datacube(self):
import pygribjump as gj
Expand Down
12 changes: 6 additions & 6 deletions tests/test_point_nearest.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def setup_method(self, method):
}

# Testing different shapes
@pytest.mark.fdb
@pytest.mark.xfail
def test_fdb_datacube(self):
import pygribjump as gj

Expand All @@ -69,7 +69,7 @@ def test_fdb_datacube(self):
result = self.API.retrieve(request)
assert len(result.leaves) == 1

@pytest.mark.fdb
@pytest.mark.xfail
def test_fdb_datacube_true_point(self):
import pygribjump as gj

Expand All @@ -96,7 +96,7 @@ def test_fdb_datacube_true_point(self):
# result.pprint()
assert len(result.leaves) == 1

@pytest.mark.fdb
@pytest.mark.xfail
def test_fdb_datacube_true_point_2(self):
import pygribjump as gj

Expand All @@ -123,7 +123,7 @@ def test_fdb_datacube_true_point_2(self):
result.pprint()
assert len(result.leaves) == 1

@pytest.mark.fdb
@pytest.mark.xfail
def test_fdb_datacube_true_point_3(self):
import pygribjump as gj

Expand Down Expand Up @@ -152,7 +152,7 @@ def test_fdb_datacube_true_point_3(self):
assert result.leaves[0].values == (359.929906542056,)
assert result.leaves[0].axis.name == "longitude"

@pytest.mark.fdb
@pytest.mark.xfail
def test_fdb_datacube_true_point_5(self):
import pygribjump as gj

Expand Down Expand Up @@ -181,7 +181,7 @@ def test_fdb_datacube_true_point_5(self):
assert result.leaves[0].values == (359.929906542056,)
assert result.leaves[0].axis.name == "longitude"

@pytest.mark.fdb
@pytest.mark.xfail
def test_fdb_datacube_true_point_4(self):
import pygribjump as gj

Expand Down
2 changes: 1 addition & 1 deletion tests/test_reduced_ll_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def setup_method(self, method):

@pytest.mark.skip(reason="wave data grid packing not supported")
@pytest.mark.internet
@pytest.mark.fdb
@pytest.mark.xfail
def test_reduced_ll_grid(self):
import pygribjump as gj

Expand Down
2 changes: 1 addition & 1 deletion tests/test_regular_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def setup_method(self, method):
],
}

@pytest.mark.fdb
@pytest.mark.xfail
@pytest.mark.internet
def test_regular_grid(self):
import pygribjump as gj
Expand Down
2 changes: 1 addition & 1 deletion tests/test_shapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_all_cyclic(self):
path = result.leaves[0].flatten()
assert path["longitude"] == tuple(range(0, 360))

@pytest.mark.fdb
@pytest.mark.xfail
def test_all_mapper_cyclic(self):
import pygribjump as gj

Expand Down
12 changes: 6 additions & 6 deletions tests/test_slice_date_range_fdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def setup_method(self, method):
}

# Testing different shapes
@pytest.mark.fdb
@pytest.mark.xfail
def test_fdb_datacube(self):
import pygribjump as gj

Expand Down Expand Up @@ -73,7 +73,7 @@ def test_fdb_datacube(self):
for i in range(len(result.leaves)):
assert len(result.leaves[i].result) == 3

@pytest.mark.fdb
@pytest.mark.xfail
def test_fdb_datacube_select_non_existing_last(self):
import pygribjump as gj

Expand Down Expand Up @@ -103,7 +103,7 @@ def test_fdb_datacube_select_non_existing_last(self):
for i in range(len(result.leaves)):
assert len(result.leaves[i].result) == 3

@pytest.mark.fdb
@pytest.mark.xfail
def test_fdb_datacube_select_non_existing_first(self):
import pygribjump as gj

Expand Down Expand Up @@ -133,7 +133,7 @@ def test_fdb_datacube_select_non_existing_first(self):
for i in range(len(result.leaves)):
assert len(result.leaves[i].result) == 3

@pytest.mark.fdb
@pytest.mark.xfail
def test_fdb_datacube_select_completely_non_existing(self):
import pygribjump as gj

Expand Down Expand Up @@ -163,7 +163,7 @@ def test_fdb_datacube_select_completely_non_existing(self):
for i in range(len(result.leaves)):
assert len(result.leaves[i].result) == 0

@pytest.mark.fdb
@pytest.mark.xfail
def test_fdb_datacube_disk(self):
import pygribjump as gj

Expand Down Expand Up @@ -195,7 +195,7 @@ def test_fdb_datacube_disk(self):
assert len(result.leaves[0].values) == 3
assert len(result.leaves[1].values) == 3

@pytest.mark.fdb
@pytest.mark.xfail
def test_fdb_datacube_disk_2(self):
import pygribjump as gj

Expand Down
2 changes: 1 addition & 1 deletion tests/test_slice_date_range_fdb_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def setup_method(self, method):
}

# Testing different shapes
@pytest.mark.fdb
@pytest.mark.xfail
@pytest.mark.skip(reason="gribjump problem")
def test_fdb_datacube(self):
import pygribjump as gj
Expand Down
2 changes: 1 addition & 1 deletion tests/test_slice_fdb_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def setup_method(self, method):

# Testing different shapes
# @pytest.mark.skip(reason="optimisation test")
@pytest.mark.fdb
@pytest.mark.xfail
def test_fdb_datacube(self):
import pygribjump as gj

Expand Down
Loading

0 comments on commit e690549

Please sign in to comment.