From 4c0b4dd3c71404ab05204c8fa16be01a940bb338 Mon Sep 17 00:00:00 2001 From: RondeauG Date: Tue, 12 Nov 2024 09:42:22 -0500 Subject: [PATCH] fix some tests --- tests/test_testing.py | 5 +++-- tests/test_utils.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test_testing.py b/tests/test_testing.py index 74006677..8bec8021 100644 --- a/tests/test_testing.py +++ b/tests/test_testing.py @@ -10,7 +10,9 @@ class TestPublish: @pytest.mark.parametrize("fmt", ["md", "rst"]) def test_normal(self, fmt): out = xs.testing.publish_release_notes( - fmt, changes=Path(__file__).parent.parent.joinpath("CHANGELOG.rst") + fmt, + changes=Path(__file__).parent.parent.joinpath("CHANGELOG.rst"), + latest=False, ) if fmt == "md": assert out.startswith("# Changelog\n\n") @@ -42,7 +44,6 @@ def test_file(self, tmpdir): def test_latest(self, tmpdir, latest): out = xs.testing.publish_release_notes( "md", - file=tmpdir / "foo.md", changes=Path(__file__).parent.parent.joinpath("CHANGELOG.rst"), latest=latest, ) diff --git a/tests/test_utils.py b/tests/test_utils.py index da978353..9b49b6c3 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -71,7 +71,7 @@ class TestDateParser: ("2001", True, "datetime", pd.Timestamp("2001-12-31 23:59:59")), ("150004", True, "datetime", pd.Timestamp("1500-04-30 23:59:59")), ("31231212", None, "datetime", pd.Timestamp("3123-12-12")), - ("2001-07-08", None, "period", pd.Period("2001-07-08", "H")), + ("2001-07-08", None, "period", pd.Period("2001-07-08", "h")), (pd.Timestamp("1993-05-20T12:07"), None, "str", "1993-05-20"), ( cftime.Datetime360Day(1981, 2, 30), @@ -94,7 +94,7 @@ class TestDateParser: ("abc", None, "datetime", pd.Timestamp("NaT")), ("", True, "datetime", pd.Timestamp("NaT")), ( - pd.Period("2001-07-08", "H"), + pd.Period("2001-07-08", "h"), None, "datetime", pd.Timestamp("2001-07-08"),