You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
when defining an async/deferred returning tearDown or setUp mypy fails with a override error or misc error on mixins.
Describe the solution you'd like
also call asyncSetUp and asyncTearDown methods defined on TestCase subclasses in deferSetUp and deferTearDown
these methods will be defined on _asynctest.TestCase as:
Describe alternatives you've considered
I attempted to add a # type: ignore[override] to the _asynctest.TestCase but it doesn't help further subclasses that also need to #type: ignore[override]
graingert
changed the title
Type safe async setUp and tearDown for twisted.trial.TestCase
Type safe async setUp and tearDown for twisted.trial.unittest.TestCase
Nov 13, 2023
Is your feature request related to a problem? Please describe.
when defining an async/deferred returning tearDown or setUp mypy fails with a
override
error ormisc
error on mixins.Describe the solution you'd like
also call asyncSetUp and asyncTearDown methods defined on TestCase subclasses in
deferSetUp
anddeferTearDown
these methods will be defined on
_asynctest.TestCase
as:Describe alternatives you've considered
I attempted to add a
# type: ignore[override]
to the_asynctest.TestCase
but it doesn't help further subclasses that also need to#type: ignore[override]
Additional context
https://mypy-play.net/?mypy=latest&python=3.11&gist=721064188d7ccae3d8360fc748e1c781&flags=strict
python/mypy#12372
The text was updated successfully, but these errors were encountered: