Skip to content

Commit

Permalink
gotta type check the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jepler committed Jul 20, 2024
1 parent e9ba7a4 commit 2ffe5c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testleapseconddata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2ffe5c2

Please sign in to comment.