Skip to content

Commit

Permalink
fix some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RondeauG committed Nov 12, 2024
1 parent 2876f4a commit 4c0b4dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions tests/test_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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,
)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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"),
Expand Down

0 comments on commit 4c0b4dd

Please sign in to comment.