diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a3d0ff..c426878 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,8 @@ and this project adheres to - Fix leaked file handles in tests using context managers ([b66a6f5], [#25]) - Fix `Decimal.normalize()` stripping trailing zeros, breaking round-trip serialization; add regression test ([28c76f1], [0130743], [#28]) +- Add return type annotations to test functions for mypy compliance + ([cd74b55], [#43]) - Fix typo in test name: `test_l9events_form_ip4scout` -> `test_l9events_from_ip4scout` ([0d8736e], [#27]) @@ -154,6 +156,7 @@ and this project adheres to +[cd74b55]: https://github.com/LeakIX/l9format-python/commit/cd74b55 [0130743]: https://github.com/LeakIX/l9format-python/commit/0130743 [28c76f1]: https://github.com/LeakIX/l9format-python/commit/28c76f1 [b66a6f5]: https://github.com/LeakIX/l9format-python/commit/b66a6f5 @@ -230,3 +233,4 @@ and this project adheres to [#33]: https://github.com/LeakIX/l9format-python/issues/33 [#25]: https://github.com/LeakIX/l9format-python/issues/25 [#35]: https://github.com/LeakIX/l9format-python/issues/35 +[#43]: https://github.com/LeakIX/l9format-python/issues/43 diff --git a/tests/test_l9format.py b/tests/test_l9format.py index 035f8ca..573e848 100644 --- a/tests/test_l9format.py +++ b/tests/test_l9format.py @@ -12,7 +12,7 @@ ] -def test_l9event_json_from_reference_repository(): +def test_l9event_json_from_reference_repository() -> None: path = TESTS_DIR / "l9event.json" with open(path) as f: c = json.load(f) @@ -55,7 +55,7 @@ def test_l9event_json_from_reference_repository(): ] -def test_l9events_from_ip4scout(): +def test_l9events_from_ip4scout() -> None: for path in IP4SCOUT_FILES: with open(path) as f: c = json.load(f) @@ -68,7 +68,7 @@ def test_l9events_from_ip4scout(): assert len(event.port) > 0 -def test_iso8601_nanosecond_parsing(): +def test_iso8601_nanosecond_parsing() -> None: """ Test ISO8601 datetime parsing with nanosecond precision. @@ -89,7 +89,7 @@ def test_iso8601_nanosecond_parsing(): assert event.time.second == 36 -def test_all_models_importable_from_package(): +def test_all_models_importable_from_package() -> None: """Verify all public models are importable from the l9format package.""" import l9format