From 1c2e2be9fbba200330ec84062eecf6662cbd5ee0 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 9 Feb 2023 08:04:42 -0700 Subject: test: adapt to latest pylint --- tests/test_cmdline.py | 6 +++--- tests/test_concurrency.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py index c517d39d..e94b1080 100644 --- a/tests/test_cmdline.py +++ b/tests/test_cmdline.py @@ -1081,7 +1081,7 @@ class CmdMainTest(CoverageTest): print("Hello, world!") elif argv[0] == 'raise': try: - raise Exception("oh noes!") + raise RuntimeError("oh noes!") except: raise _ExceptionDuringRun(*sys.exc_info()) from None elif argv[0] == 'internalraise': @@ -1111,8 +1111,8 @@ class CmdMainTest(CoverageTest): print(err) err_parts = err.splitlines(keepends=True) assert err_parts[0] == 'Traceback (most recent call last):\n' - assert ' raise Exception("oh noes!")\n' in err_parts - assert err_parts[-1] == 'Exception: oh noes!\n' + assert ' raise RuntimeError("oh noes!")\n' in err_parts + assert err_parts[-1] == 'RuntimeError: oh noes!\n' def test_internalraise(self) -> None: with pytest.raises(ValueError, match="coverage is broken"): diff --git a/tests/test_concurrency.py b/tests/test_concurrency.py index 3360094b..9f12e77e 100644 --- a/tests/test_concurrency.py +++ b/tests/test_concurrency.py @@ -584,7 +584,7 @@ class MultiprocessingTest(CoverageTest): """) out = self.run_command("coverage run multi.py") assert "Exception during multiprocessing bootstrap init" in out - assert "Exception: Crashing because called by _bootstrap" in out + assert "RuntimeError: Crashing because called by _bootstrap" in out def test_bug_890(self) -> None: # chdir in multiprocessing shouldn't keep us from finding the -- cgit v1.2.1