Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions pandas/tests/io/pytables/test_timezones.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,13 @@ def test_append_with_timezones_dateutil(setup_path):
),
index=range(5),
)
with pytest.raises(ValueError):

msg = (
r"invalid info for \[values_block_1\] for \[tz\], "
r"existing_value \[dateutil/.*US/Eastern\] "
r"conflicts with new value \[dateutil/.*EET\]"
)
with pytest.raises(ValueError, match=msg):
store.append("df_tz", df)

# this is ok
Expand All @@ -100,7 +106,13 @@ def test_append_with_timezones_dateutil(setup_path):
),
index=range(5),
)
with pytest.raises(ValueError):

msg = (
r"invalid info for \[B\] for \[tz\], "
r"existing_value \[dateutil/.*EET\] "
r"conflicts with new value \[dateutil/.*CET\]"
)
with pytest.raises(ValueError, match=msg):
store.append("df_tz", df)

# as index
Expand Down Expand Up @@ -169,7 +181,12 @@ def test_append_with_timezones_pytz(setup_path):
),
index=range(5),
)
with pytest.raises(ValueError):

msg = (
r"invalid info for \[values_block_1\] for \[tz\], "
r"existing_value \[US/Eastern\] conflicts with new value \[EET\]"
)
with pytest.raises(ValueError, match=msg):
store.append("df_tz", df)

# this is ok
Expand All @@ -187,7 +204,12 @@ def test_append_with_timezones_pytz(setup_path):
),
index=range(5),
)
with pytest.raises(ValueError):

msg = (
r"invalid info for \[B\] for \[tz\], "
r"existing_value \[EET\] conflicts with new value \[CET\]"
)
with pytest.raises(ValueError, match=msg):
store.append("df_tz", df)

# as index
Expand Down