Skip to content

Commit bd64357

Browse files
committed
Forgot to update tests
1 parent b09bd89 commit bd64357

1 file changed

Lines changed: 2 additions & 14 deletions

File tree

climada/trajectories/test/test_snapshot.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,6 @@ def mock_context(shared_data):
6464
# --- Tests ---
6565

6666

67-
def test_not_from_factory_warning(mock_context):
68-
"""Test that direct __init__ call raises a warning"""
69-
with pytest.warns(UserWarning):
70-
Snapshot(
71-
exposure=mock_context["exp"],
72-
hazard=mock_context["haz"],
73-
impfset=mock_context["imp"],
74-
measure=None,
75-
date="2001",
76-
)
77-
78-
7967
@pytest.mark.parametrize(
8068
"input_date,expected",
8169
[
@@ -98,7 +86,7 @@ def test_init_valid_dates(mock_context, input_date, expected):
9886

9987

10088
def test_init_invalid_date_format(mock_context):
101-
with pytest.raises(ValueError, match="String must be in the format"):
89+
with pytest.raises(ValueError, match=r"String must be in a valid date format"):
10290
Snapshot(
10391
exposure=mock_context["exp"],
10492
hazard=mock_context["haz"],
@@ -110,7 +98,7 @@ def test_init_invalid_date_format(mock_context):
11098
def test_init_invalid_date_type(mock_context):
11199
with pytest.raises(
112100
TypeError,
113-
match=r"date_arg must be an str, datetime.date or pandas.Timestamp",
101+
match=r"Unsupported type",
114102
):
115103
Snapshot(
116104
exposure=mock_context["exp"],

0 commit comments

Comments
 (0)