Replace bare excepts with except BaseException

Mostly I wanted to remove uses of `noqa`.

In Python 3 the two are the same.
This commit is contained in:
Ran Benita
2020-04-24 22:15:45 +03:00
parent d1534181c0
commit 59a12e9ab3
6 changed files with 9 additions and 9 deletions

View File

@@ -239,7 +239,7 @@ class TestTraceback_f_g_h:
def f(n: int) -> None:
try:
do_stuff()
except: # noqa
except BaseException:
reraise_me()
excinfo = pytest.raises(RuntimeError, f, 8)
@@ -445,7 +445,7 @@ class TestFormattedExcinfo:
exec(source.compile())
except KeyboardInterrupt:
raise
except: # noqa
except BaseException:
return _pytest._code.ExceptionInfo.from_current()
assert 0, "did not raise"