From 2ffe5c2ff01858c4fbe179c60160c6ee719f5b87 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 20 Jul 2024 10:54:01 -0500 Subject: [PATCH] gotta type check the tests --- testleapseconddata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testleapseconddata.py b/testleapseconddata.py index c6e52f9..1bf8315 100644 --- a/testleapseconddata.py +++ b/testleapseconddata.py @@ -136,13 +136,13 @@ def test_to_tai(self) -> None: assert when_tai.tzinfo is leapseconddata.tai assert when_tai2.tzinfo is leapseconddata.tai - def assertPrints(self, code, expected): # noqa: N802 + def assertPrints(self, code: str, expected: str) -> None: # noqa: N802 buf = io.StringIO() with contextlib.redirect_stdout(buf): exec(code, {}, {}) self.assertEqual(expected, buf.getvalue()) - def test_doc(self): + def test_doc(self) -> None: docs = pathlib.Path(__file__).parent / "docs" for expected in docs.rglob("**/*.py.exp"): py = expected.with_suffix("") # Pop off the ".exp" suffix