Skip to content

Instantly share code, notes, and snippets.

@phouse512
Created June 21, 2016 13:33
Show Gist options
  • Save phouse512/9b8844216de8f3510547f5433fef866b to your computer and use it in GitHub Desktop.
Save phouse512/9b8844216de8f3510547f5433fef866b to your computer and use it in GitHub Desktop.
# python3 test assertListEquals stub.
from unittest import TestCase
from typing import List
class MyTest(TestCase):
def test_assert_list(self) -> None:
list1 = list() # type: List[None]
list2 = list() # type: List[None]
self.assertListEqual(list1, list2)
# when running mypy with --disallow-untyped-calls, this previously did not pass successfully, it now does with these changes.
# python 2.7 test assertListEquals stub.
from unittest import TestCase
from typing import List
class MyTest(TestCase):
def test_assert_list(self):
# type: () -> None
list1 = list() # type: List[None]
list2 = list() # type: List[None]
self.assertListEqual(list1, list2)
# when running mypy with --disallow-untyped-calls, this previously did not pass, it now does.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment