File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -558,7 +558,7 @@ def raises( # noqa: F811
558558 func : Callable ,
559559 * args : Any ,
560560 ** kwargs : Any
561- ) -> Optional [ _pytest ._code .ExceptionInfo [_E ] ]:
561+ ) -> _pytest ._code .ExceptionInfo [_E ]:
562562 ... # pragma: no cover
563563
564564
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ def __call__(self):
187187
188188 assert refcount == len (gc .get_referrers (t ))
189189
190- def test_raises_match (self ):
190+ def test_raises_match (self ) -> None :
191191 msg = r"with base \d+"
192192 with pytest .raises (ValueError , match = msg ):
193193 int ("asdf" )
@@ -215,8 +215,8 @@ def test_raises_match(self):
215215 def tfunc (match ):
216216 raise ValueError ("match={}" .format (match ))
217217
218- excinfo = pytest .raises (ValueError , tfunc , match = "asdf" ).match ("match=asdf" )
219- excinfo = pytest .raises (ValueError , tfunc , match = "" ).match ("match=" )
218+ pytest .raises (ValueError , tfunc , match = "asdf" ).match ("match=asdf" )
219+ pytest .raises (ValueError , tfunc , match = "" ).match ("match=" )
220220
221221 def test_match_failure_string_quoting (self ):
222222 with pytest .raises (AssertionError ) as excinfo :
You can’t perform that action at this time.
0 commit comments