Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
nada-ben-ali committed Dec 15, 2024
1 parent 06f30d1 commit 6e8cfcf
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/test_odxtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,13 @@ def test_encode_response_with_matching_request_param_and_structure(self) -> None
class X:
short_name: str
value: int


class TestNamedItemList(unittest.TestCase):

def setUp(self):
class TestNamedItemList(unittest.TestCase):
def setUp(self) -> None:
self.foo_obj = NamedItemList([X("hello", 0), X("world", 1)])

def test_NamedItemList(self):
def test_NamedItemList(self) -> None:
# Test with the original object
foo = self.foo_obj.__class__(self.foo_obj)
self._test_NamedItemList_functionality(foo)
Expand All @@ -112,7 +111,7 @@ def test_NamedItemList(self):
unpickled_foo = pickle.loads(pickled_foo)
self._test_NamedItemList_functionality(unpickled_foo)

def _test_NamedItemList_functionality(self, foo):
def _test_NamedItemList_functionality(self, foo: NamedItemList[X]) -> None:
self.assertEqual(foo.hello, X("hello", 0))
self.assertEqual(foo[0], X("hello", 0))
self.assertEqual(foo[1], X("world", 1))
Expand Down

0 comments on commit 6e8cfcf

Please sign in to comment.