Skip to content

Commit

Permalink
add a test to address codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadtourei committed Dec 19, 2024
1 parent 2ee9be6 commit 9970dee
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ def test_moveout(self):
class TestDeltaPatch:
"""Tests for the delta_patch example."""

@pytest.mark.parametrize("invalid_dim", ["invalid_dimension", "", None, 123])
def test_delta_patch_invalid_dim(self, invalid_dim):
"""
Test that passing an invalid dimension value raises a ValueError.
"""
with pytest.raises(ValueError, match="The delta patch is a 2D patch"):
dc.get_example_patch("delta_patch", dim=invalid_dim)

@pytest.mark.parametrize("dim", ["time", "distance"])
def test_delta_patch_structure(self, dim):
"""Test that the delta_patch returns a Patch with correct structure."""
Expand Down

0 comments on commit 9970dee

Please sign in to comment.