Skip to content

Commit

Permalink
Annotate the test_models package
Browse files Browse the repository at this point in the history
  • Loading branch information
mthuurne committed Mar 27, 2024
1 parent 9450b65 commit e0bda54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/test_models/test_status_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@


class StatusModelTests(TestCase):
model: type[Status] | type[StatusPlainTuple]

def setUp(self) -> None:
self.model = Status
self.on_hold = Status.STATUS.on_hold
Expand Down
3 changes: 2 additions & 1 deletion tests/test_models/test_timestamped_model.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

from collections.abc import Iterable
from datetime import datetime, timedelta, timezone

import time_machine
Expand Down Expand Up @@ -114,7 +115,7 @@ def test_save_with_update_fields_overrides_modified_provided_within_a(self) -> N
self.assertEqual(t1.modified, datetime(2020, 1, 2, tzinfo=timezone.utc))

def test_save_is_skipped_for_empty_update_fields_iterable(self) -> None:
tests = (
tests: Iterable[list | tuple | set] = (
[], # list
(), # tuple
set(), # set
Expand Down

0 comments on commit e0bda54

Please sign in to comment.