[3.11] gh-106300: Improve assertRaises(Exception) usages in tests (GH-106302). (GH-106545)

(cherry picked from commit 6e6a4cd523)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
Serhiy Storchaka 2023-07-08 11:22:33 +03:00 committed by GitHub
parent 1931c2a438
commit 6cd08a566f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 20 additions and 12 deletions

View file

@ -56,7 +56,7 @@ def test_new_style_classes(self):
dict(name=''),
)
def test_invalid_inputs_to_from_name(self, name):
with self.assertRaises(Exception):
with self.assertRaises(ValueError):
Distribution.from_name(name)